yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum install docker-ce docker-ce-cli containerd.io
报如下错误:
问题: package docker-ce-3:20.10.1-3.el7.x86_64 requires containerd.io >= 1.4.1, but none of the providers can be installed
列出并排序您存储库中可用的版本,按版本号(从高到低)对结果进行排序。
yum list docker-ce --showduplicates | sort -r
此时列出了当前可安装的所有稳定版版本,在这里就以docker-ce-19.03.9-3.el7版为例。
yum install -y docker-ce-19.03.9-3.el7 docker-ce-cli-19.03.9-3.el7 containerd.io
依旧报错
问题: package docker-ce-3:19.03.9-3.el7.x86_64 requires containerd.io >= 1.2.2-3, but none of the providers can be installed
打开下面这个网站
https://mirrors.aliyun.com/docker-ce/linux/centos/8/x86_64/edge/Packages/
yum install -y https://mirrors.aliyun.com/docker-ce/linux/centos/8/x86_64/edge/Packages/containerd.io-1.3.7-3.1.el8.x86_64.rpm
报错
在执行安装docker命令,出现包冲突podman-manpages-1.4.2-5.module_el8.1.0+237+63e26edc.noarch
问题: problem with installed package podman-2.0.5-5.module_el8.3.0+512+b3b58dca.x86_64
执行以下命令没有报错
yum install -y https://mirrors.aliyun.com/docker-ce/linux/centos/8/x86_64/edge/Packages/containerd.io-1.3.7-3.1.el8.x86_64.rpm https://mirrors.aliyun.com/docker-ce/linux/centos/8/x86_64/edge/Packages/docker-ce-19.03.13-3.el8.x86_64.rpm https://mirrors.aliyun.com/docker-ce/linux/centos/8/x86_64/edge/Packages/docker-ce-cli-19.03.13-3.el8.x86_64.rpm --allowerasing
将docker设置为开机启动项
systemctl enable docker
查看开机启动项
systemctl list-unit-files | grep docker
启动docker
systemctl start docker
查看docker版本
docker -v
测试
docker run hello-world
此时,Docker最新版已经安装并启动成功了
版权说明 : 本文为转载文章, 版权归原作者所有 版权申明
原文链接 : https://blog.csdn.net/ThinkWon/article/details/115056214
内容来源于网络,如有侵权,请联系作者删除!