卸载旧版本
$ 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 \
gnupg-agent \
software-properties-common
添加 Docker 的官方 GPG 密钥:
$ curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88 通过搜索指纹的后8个字符,验证您现在是否拥有带有指纹的密钥。
$ sudo apt-key fingerprint 0EBFCD88
使用以下指令设置稳定版仓库
$ sudo add-apt-repository \
"deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/ \
$(lsb_release -cs) \
stable"
安装 Docker Engine-Community
更新 apt 包索引。
$ sudo apt-get
本文指导如何在Ubuntu系统中卸载旧版本Docker,设置官方仓库,并安装Docker Engine-Community。步骤包括更新apt索引,安装依赖,添加GPG密钥,设置仓库,安装指定版本的Docker,并验证安装是否成功。
最低0.47元/天 解锁文章

1193

被折叠的 条评论
为什么被折叠?



