1. add the GPG key for the official docker repo
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
2. Add the docker repository to APT sources:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
3. update the package database with docker pakcages
sudo apt-get udpate
4. make sure you are about to install from the docker repo instead of the default ubuntu 16.04 repo
apt-cache policy docker-ce
5. install docker
sudo apt-get install -y docker-ce
6. start docker on boot
sudo systemctl status docker
7. Test docker
docker run hello-world
the output, which should include the following, should indicate that docker in working correctly.
Hello from Docker.This message shows that your installation appears to be working correctly....
网友评论