- 移除旧版本
sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
- 安装工具以及设置docker仓库(不用原生仓库太慢)
sudo yum install -y yum-utils
sudo yum-config-manager \
--add-repo \
http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
- 安装docker
sudo yum makecache fast
sudo yum install docker-ce docker-ce-cli containerd.io
- 启动docker
sudo systemctl start docker
systemctl enable docker
5.腾讯云配置镜像加速器
sudo mkdir -p /etc/docker
vi /etc/docker/daemon.json
{
"registry-mirrors": [
"https://mirror.ccs.tencentyun.com"
]
}
sudo systemctl daemon-reload
sudo systemctl restart docker
参考文档:安装Docker详细步骤总结
网友评论