卸载旧版本
如果之前安装旧版本,需要先卸载:
$ sudo apt-get remove docker docker-engine docker.io containerd runc设置仓库
更新
apt包索引:
$ sudo apt-get update让
apt能通过HTTPS使用仓库:
$ sudo apt-get install
apt-transport-https
ca-certificates
curl
software-properties-common添加官方的GPG 密钥:
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -验证你的密钥:
$ sudo apt-key fingerprint 0EBFCD88
设置选用哪个版本。
$ sudo add-apt-repository
"deb [arch=amd64] https://download.docker.com/linux/ubuntu
$(lsb_release -cs)
test"我选用了test版本。
安装
更新
apt包索引
$ sudo apt-get update开始安装
$ sudo apt-get install docker-ce docker-ce-cli containerd.io测试
$ sudo docker run hello-world
参考
Get Docker Engine – Coummuntiy for Ubuntu
您可能感兴趣的文章:树莓派4b ubuntu19 server 安装docker-ce的安装步骤Ubuntu下Docker CE的安装ubuntu17.10安装docker-ce的方法ubuntu16.10安装docker17.03.0-ce并配置国内源和加速器详解在Ubuntu16.10上安装docker ce在Ubuntu 16.04上用Docker Swarm和DigitalOcean创建一个Docker容器集群的方法










