Docker in ubuntu installation together with me in

Uninstall the old version

$ sudo apt-get remove docker docker-engine docker.io

View ubuntu version

set installation source
through the following steps to set up the installation source warehouse, where we use Ali source

sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu
$(lsb_release -cs) stable"

Docker Community Edition installation
the following command to install the latest version docker

sudo apt-get update
sudo apt-get install docker-ce

Verify that the installation was successful
by running hello-world examples can verify that the installation was successful
uninstall docker Community Edition:

 sudo apt-get purge docker-ce

Guess you like

Origin www.cnblogs.com/smart-girl/p/11318827.html