# 添加docker apt源
echo "deb [arch=amd64] http://mirrors.jdcloudcs.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable" >>/etc/apt/sources.list
# 下载gpg密钥
wget http://mirrors.jdcloudcs.com/docker-ce/linux/ubuntu/gpg -O docker.gpg
# 添加gpg密钥
apt-key add docker.gpg
# 更新apt源
apt-get update
# 安装docker-ce
apt-get install docker-ce
docker镜像源无法pull问题解决方案参考GitHub大佬写的文档:https://gist.github.com/y0ngb1n/7e8f16af3242c7815e7ca2f0833d3ea6
评论区