Step 1. Update the
Step 2. Install packages to allow apt to use a repository over HTTPS:
Step 3. Add Docker’s official GPG key:
Step 4. Set up the stable repository (command depends on system architecture):
Step 5. Update the package index again:
Step 6. Install the
Step 7. Verify that docker installed properlty:
apt
package index:sudo apt-get update
Step 2. Install packages to allow apt to use a repository over HTTPS:
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
Step 3. Add Docker’s official GPG key:
curl -fsSL https://download.docker.com/ linux/ubuntu/gpg | sudo apt-key add -
Step 4. Set up the stable repository (command depends on system architecture):
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/ linux/ubuntu \
$(lsb_release -cs) \
stable"
Step 5. Update the package index again:
sudo apt-get update
Step 6. Install the
docker-ce
package (the service should start automatically after installation):sudo apt-get install docker-ce
Step 7. Verify that docker installed properlty:
sudo docker run hello-world
Comments