1. unload 原的docker
sudo apt-get remove docker docker-engine docker-ce docker.io
sudo apt-get update
2. apt-get 可以使用https库
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
3. 添加docker的使用的公钥
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
4. 添加docker的远程库
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt-get update
5. 安装docker-ce
sudo apt-get install -y docker-ce
6. 启动docker
systemctl status docker
7. 运行hello-world
···
sudo docker run hello-world
···