• 根据docker官方文档,需要卸载旧版docker
sudo apt-get remove docker docker-engine docker.io containerd runc
  • 确保你的linux内核版本高于3.10,且为64位os
 uname -r 
  • 更新apt
sudo apt-get update
  • 添加使用 HTTPS 传输的软件包以及 CA 证书
 sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common 
  • 添加Docker的官方GPG密钥
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  • 使用以下命令设置稳定存储库
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu artful stable"
  • 再执行步骤1更新一下apt
  • 安装最新版本的Docker CE
 sudo apt-get install -y docker-ce 
  • 启动docker服务
 sudo systemctl start docker 
  • 查看docker服务是否启动
 systemctl status docker 

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注