打开docker官网:www.docker.com
可以按照官网的帮助文档进行操作,具体如下。
1.帮助文档:Docker Documentation | Docker Documentation
2.Download and install
4.Install
5.Installation per distro
6.Install on CentOS
具体步骤,在服务器上进行如下操作:
# 1.卸载旧的版本
sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
# 2.需要的安装包
sudo yum install -y yum-utils
# 3.设置镜像仓库
sudo yum-config-manager \
--add-repo \
# 默认是国外的,不要使用
https://download.docker.com/linux/centos/docker-ce.repo
# 建议使用阿里云的镜像,十分快
sudo yum-config-manager \
--add-repo \
http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
# 更新yum软件包索引(安装前的工作,非必须)
yum makecache fast
# yum makecache: error: argument timer: invalid choice: 'fast' (choose from 'timer')
# 安装报错了,yum makecache fast是centOS7的命令, 不使用8,可以直接使用
yum makecache # 或者
dnf makecache
# 4.安装docker docker-ce:社区版的,docker-ee:企业版的
sudo yum install docker-ce docker-ce-cli containerd.io
第四步报错了:
Docker CE Stable – x86_64 120 kB/s | 19 kB 00:00
错误:
问题 1: 安装的软件包的问题 podman-1:3.4.1-3.module_el8.6.0+954+963caf36.x86_64
– 软件包 podman-1:3.4.1-3.module_el8.6.0+954+963caf36.x86_64 需要 runc >= 1.0.0-57,但没有提供者可以被安装
– 软件包 podman-3.1.0-0.13.module_el8.5.0+733+9bb5dffa.x86_64 需要 runc >= 1.0.0-57,但没有提供者可以被安装
– 软件包 podman-3.3.0-0.15.module_el8.5.0+870+f792de72.x86_64 需要 runc >= 1.0.0-57,但没有提供者可以被安装
– 软件包 podman-3.3.0-0.17.module_el8.5.0+874+6db8bee3.x86_64 需要 runc >= 1.0.0-57,但没有提供者可以被安装
– 软件包 podman-3.3.0-2.module_el8.5.0+877+1c30e0c9.x86_64 需要 runc >= 1.0.0-57,但没有提供者可以被安装
– 软件包 podman-3.3.0-4.module_el8.5.0+890+6b136101.x86_64 需要 runc >= 1.0.0-57,但没有提供者可以被安装
– 软件包 podman-3.3.0-8.module_el8.5.0+901+79ce9cba.x86_64 需要 runc >= 1.0.0-57,但没有提供者可以被安装
– 软件包 podman-3.3.1-3.module_el8.5.0+911+f19012f9.x86_64 需要 runc >= 1.0.0-57,但没有提供者可以被安装
– 软件包 podman-3.3.1-7.module_el8.5.0+914+45625a54.x86_64 需要 runc >= 1.0.0-57,但没有提供者可以被安装
– 软件包 podman-3.3.1-9.module_el8.6.0+938+04eb0c17.x86_64 需要 runc >= 1.0.0-57,但没有提供者可以被安装
– 软件包 podman-4.0.0-0.10.module_el8.6.0+944+d413f95e.x86_64 需要 runc >= 1.0.0-57,但没有提供者可以被安装
– 软件包 containerd.io-1.4.12-3.1.el8.x86_64 与 runc(由 runc-1.0.2-1.module_el8.6.0+926+8bef8ae7.x86_64 提供)冲突
– 软件包 containerd.io-1.4.12-3.1.el8.x86_64 取代了 runc(由 runc-1.0.2-1.module_el8.6.0+926+8bef8ae7.x86_64 提供)
– 软件包 containerd.io-1.4.12-3.1.el8.x86_64 与 runc(由 runc-1.0.0-70.rc92.module_el8.5.0+733+9bb5dffa.x86_64 提供)冲突
– 软件包 containerd.io-1.4.12-3.1.el8.x86_64 取代了 runc(由 runc-1.0.0-70.rc92.module_el8.5.0+733+9bb5dffa.x86_64 提供)
– 软件包 containerd.io-1.4.12-3.1.el8.x86_64 与 runc(由 runc-1.0.1-3.module_el8.5.0+870+f792de72.x86_64 提供)冲突
– 软件包 containerd.io-1.4.12-3.1.el8.x86_64 取代了 runc(由 runc-1.0.1-3.module_el8.5.0+870+f792de72.x86_64 提供)
– 软件包 containerd.io-1.4.12-3.1.el8.x86_64 与 runc(由 runc-1.0.1-5.module_el8.5.0+878+851f435b.x86_64 提供)冲突
– 软件包 containerd.io-1.4.12-3.1.el8.x86_64 取代了 runc(由 runc-1.0.1-5.module_el8.5.0+878+851f435b.x86_64 提供)
– 软件包 containerd.io-1.4.12-3.1.el8.x86_64 与 runc(由 runc-1.0.1-5.module_el8.5.0+890+6b136101.x86_64 提供)冲突
– 软件包 containerd.io-1.4.12-3.1.el8.x86_64 取代了 runc(由 runc-1.0.1-5.module_el8.5.0+890+6b136101.x86_64 提供)
– 软件包 containerd.io-1.4.12-3.1.el8.x86_64 与 runc(由 runc-1.0.2-1.module_el8.5.0+911+f19012f9.x86_64 提供)冲突
– 软件包 containerd.io-1.4.12-3.1.el8.x86_64 取代了 runc(由 runc-1.0.2-1.module_el8.5.0+911+f19012f9.x86_64 提供)
– 无法为该任务安装最佳候选
– 软件包 runc-1.0.0-64.rc10.module_el8.4.0+522+66908d0c.x86_64 被模块过滤过滤掉
– 软件包 runc-1.0.0-70.rc92.module_el8.5.0+736+58cc1a5a.x86_64 被模块过滤过滤掉
问题 2: 软件包 podman-3.1.0-0.13.module_el8.5.0+733+9bb5dffa.x86_64 需要 runc >= 1.0.0-57,但没有提供者可以被安装
– 软件包 containerd.io-1.4.3-3.1.el8.x86_64 与 runc(由 runc-1.0.0-70.rc92.module_el8.5.0+733+9bb5dffa.x86_64 提供)冲突
– 软件包 containerd.io-1.4.3-3.1.el8.x86_64 取代了 runc(由 runc-1.0.0-70.rc92.module_el8.5.0+733+9bb5dffa.x86_64 提供)
– 软件包 containerd.io-1.4.3-3.1.el8.x86_64 与 runc(由 runc-1.0.1-3.module_el8.5.0+870+f792de72.x86_64 提供)冲突
– 软件包 containerd.io-1.4.3-3.1.el8.x86_64 取代了 runc(由 runc-1.0.1-3.module_el8.5.0+870+f792de72.x86_64 提供)
– 软件包 containerd.io-1.4.3-3.1.el8.x86_64 与 runc(由 runc-1.0.1-5.module_el8.5.0+878+851f435b.x86_64 提供)冲突
– 软件包 containerd.io-1.4.3-3.1.el8.x86_64 取代了 runc(由 runc-1.0.1-5.module_el8.5.0+878+851f435b.x86_64 提供)
– 软件包 containerd.io-1.4.3-3.1.el8.x86_64 与 runc(由 runc-1.0.1-5.module_el8.5.0+890+6b136101.x86_64 提供)冲突
– 软件包 containerd.io-1.4.3-3.1.el8.x86_64 取代了 runc(由 runc-1.0.1-5.module_el8.5.0+890+6b136101.x86_64 提供)
– 软件包 containerd.io-1.4.3-3.1.el8.x86_64 与 runc(由 runc-1.0.2-1.module_el8.5.0+911+f19012f9.x86_64 提供)冲突
– 软件包 containerd.io-1.4.3-3.1.el8.x86_64 取代了 runc(由 runc-1.0.2-1.module_el8.5.0+911+f19012f9.x86_64 提供)
– 软件包 containerd.io-1.4.3-3.1.el8.x86_64 与 runc(由 runc-1.0.2-1.module_el8.6.0+926+8bef8ae7.x86_64 提供)冲突
– 软件包 containerd.io-1.4.3-3.1.el8.x86_64 取代了 runc(由 runc-1.0.2-1.module_el8.6.0+926+8bef8ae7.x86_64 提供)
– 软件包 docker-ce-3:20.10.11-3.el8.x86_64 需要 containerd.io >= 1.4.1,但没有提供者可以被安装
– 软件包 containerd.io-1.4.3-3.2.el8.x86_64 与 runc(由 runc-1.0.0-70.rc92.module_el8.5.0+733+9bb5dffa.x86_64 提供)冲突
– 软件包 containerd.io-1.4.3-3.2.el8.x86_64 取代了 runc(由 runc-1.0.0-70.rc92.module_el8.5.0+733+9bb5dffa.x86_64 提供)
– 软件包 containerd.io-1.4.3-3.2.el8.x86_64 与 runc(由 runc-1.0.1-3.module_el8.5.0+870+f792de72.x86_64 提供)冲突
– 软件包 containerd.io-1.4.3-3.2.el8.x86_64 取代了 runc(由 runc-1.0.1-3.module_el8.5.0+870+f792de72.x86_64 提供)
– 软件包 containerd.io-1.4.3-3.2.el8.x86_64 与 runc(由 runc-1.0.1-5.module_el8.5.0+878+851f435b.x86_64 提供)冲突
– 软件包 containerd.io-1.4.3-3.2.el8.x86_64 取代了 runc(由 runc-1.0.1-5.module_el8.5.0+878+851f435b.x86_64 提供)
– 软件包 containerd.io-1.4.3-3.2.el8.x86_64 与 runc(由 runc-1.0.1-5.module_el8.5.0+890+6b136101.x86_64 提供)冲突
– 软件包 containerd.io-1.4.3-3.2.el8.x86_64 取代了 runc(由 runc-1.0.1-5.module_el8.5.0+890+6b136101.x86_64 提供)
– 软件包 containerd.io-1.4.3-3.2.el8.x86_64 与 runc(由 runc-1.0.2-1.module_el8.5.0+911+f19012f9.x86_64 提供)冲突
– 软件包 containerd.io-1.4.3-3.2.el8.x86_64 取代了 runc(由 runc-1.0.2-1.module_el8.5.0+911+f19012f9.x86_64 提供)
– 软件包 containerd.io-1.4.3-3.2.el8.x86_64 与 runc(由 runc-1.0.2-1.module_el8.6.0+926+8bef8ae7.x86_64 提供)冲突
– 软件包 containerd.io-1.4.3-3.2.el8.x86_64 取代了 runc(由 runc-1.0.2-1.module_el8.6.0+926+8bef8ae7.x86_64 提供)
– 软件包 podman-catatonit-3.1.0-0.13.module_el8.5.0+733+9bb5dffa.x86_64 需要 podman = 3.1.0-0.13.module_el8.5.0+733+9bb5dffa,但没有提供者可以被安装
– 安装的软件包的问题 podman-catatonit-1:3.4.1-3.module_el8.6.0+954+963caf36.x86_64
– 软件包 podman-catatonit-3.3.0-0.15.module_el8.5.0+870+f792de72.x86_64 需要 podman = 3.3.0-0.15.module_el8.5.0+870+f792de72,但没有提供者可以被安装
– 软件包 podman-3.3.0-0.15.module_el8.5.0+870+f792de72.x86_64 需要 runc >= 1.0.0-57,但没有提供者可以被安装
– 软件包 containerd.io-1.4.10-3.1.el8.x86_64 与 runc(由 runc-1.0.2-1.module_el8.6.0+926+8bef8ae7.x86_64 提供)冲突
– 软件包 containerd.io-1.4.10-3.1.el8.x86_64 取代了 runc(由 runc-1.0.2-1.module_el8.6.0+926+8bef8ae7.x86_64 提供)
– 软件包 containerd.io-1.4.11-3.1.el8.x86_64 与 runc(由 runc-1.0.2-1.module_el8.6.0+926+8bef8ae7.x86_64 提供)冲突
– 软件包 containerd.io-1.4.11-3.1.el8.x86_64 取代了 runc(由 runc-1.0.2-1.module_el8.6.0+926+8bef8ae7.x86_64 提供)
– 软件包 containerd.io-1.4.12-3.1.el8.x86_64 与 runc(由 runc-1.0.2-1.module_el8.6.0+926+8bef8ae7.x86_64 提供)冲突
– 软件包 containerd.io-1.4.12-3.1.el8.x86_64 取代了 runc(由 runc-1.0.2-1.module_el8.6.0+926+8bef8ae7.x86_64 提供)
– 软件包 containerd.io-1.4.4-3.1.el8.x86_64 与 runc(由 runc-1.0.2-1.module_el8.6.0+926+8bef8ae7.x86_64 提供)冲突
– 软件包 containerd.io-1.4.4-3.1.el8.x86_64 取代了 runc(由 runc-1.0.2-1.module_el8.6.0+926+8bef8ae7.x86_64 提供)
– 软件包 containerd.io-1.4.6-3.1.el8.x86_64 与 runc(由 runc-1.0.2-1.module_el8.6.0+926+8bef8ae7.x86_64 提供)冲突
– 软件包 containerd.io-1.4.6-3.1.el8.x86_64 取代了 runc(由 runc-1.0.2-1.module_el8.6.0+926+8bef8ae7.x86_64 提供)
– 软件包 containerd.io-1.4.8-3.1.el8.x86_64 与 runc(由 runc-1.0.2-1.module_el8.6.0+926+8bef8ae7.x86_64 提供)冲突
– 软件包 containerd.io-1.4.8-3.1.el8.x86_64 取代了 runc(由 runc-1.0.2-1.module_el8.6.0+926+8bef8ae7.x86_64 提供)
– 软件包 containerd.io-1.4.9-3.1.el8.x86_64 与 runc(由 runc-1.0.2-1.module_el8.6.0+926+8bef8ae7.x86_64 提供)冲突
– 软件包 containerd.io-1.4.9-3.1.el8.x86_64 取代了 runc(由 runc-1.0.2-1.module_el8.6.0+926+8bef8ae7.x86_64 提供)
– 无法为该任务安装最佳候选
– 软件包 runc-1.0.0-64.rc10.module_el8.4.0+522+66908d0c.x86_64 被模块过滤过滤掉
– 软件包 runc-1.0.0-70.rc92.module_el8.5.0+736+58cc1a5a.x86_64 被模块过滤过滤掉
– 软件包 containerd.io-1.4.4-3.1.el8.x86_64 与 runc(由 runc-1.0.0-70.rc92.module_el8.5.0+733+9bb5dffa.x86_64 提供)冲突
– 软件包 containerd.io-1.4.4-3.1.el8.x86_64 取代了 runc(由 runc-1.0.0-70.rc92.module_el8.5.0+733+9bb5dffa.x86_64 提供)
– 软件包 containerd.io-1.4.4-3.1.el8.x86_64 与 runc(由 runc-1.0.1-3.module_el8.5.0+870+f792de72.x86_64 提供)冲突
– 软件包 containerd.io-1.4.4-3.1.el8.x86_64 取代了 runc(由 runc-1.0.1-3.module_el8.5.0+870+f792de72.x86_64 提供)
– 软件包 containerd.io-1.4.4-3.1.el8.x86_64 与 runc(由 runc-1.0.1-5.module_el8.5.0+878+851f435b.x86_64 提供)冲突
– 软件包 containerd.io-1.4.4-3.1.el8.x86_64 取代了 runc(由 runc-1.0.1-5.module_el8.5.0+878+851f435b.x86_64 提供)
– 软件包 containerd.io-1.4.4-3.1.el8.x86_64 与 runc(由 runc-1.0.1-5.module_el8.5.0+890+6b136101.x86_64 提供)冲突
– 软件包 containerd.io-1.4.4-3.1.el8.x86_64 取代了 runc(由 runc-1.0.1-5.module_el8.5.0+890+6b136101.x86_64 提供)
– 软件包 containerd.io-1.4.4-3.1.el8.x86_64 与 runc(由 runc-1.0.2-1.module_el8.5.0+911+f19012f9.x86_64 提供)冲突
– 软件包 containerd.io-1.4.4-3.1.el8.x86_64 取代了 runc(由 runc-1.0.2-1.module_el8.5.0+911+f19012f9.x86_64 提供)
– 软件包 containerd.io-1.4.6-3.1.el8.x86_64 与 runc(由 runc-1.0.0-70.rc92.module_el8.5.0+733+9bb5dffa.x86_64 提供)冲突
– 软件包 containerd.io-1.4.6-3.1.el8.x86_64 取代了 runc(由 runc-1.0.0-70.rc92.module_el8.5.0+733+9bb5dffa.x86_64 提供)
– 软件包 containerd.io-1.4.6-3.1.el8.x86_64 与 runc(由 runc-1.0.1-3.module_el8.5.0+870+f792de72.x86_64 提供)冲突
– 软件包 containerd.io-1.4.6-3.1.el8.x86_64 取代了 runc(由 runc-1.0.1-3.module_el8.5.0+870+f792de72.x86_64 提供)
– 软件包 containerd.io-1.4.6-3.1.el8.x86_64 与 runc(由 runc-1.0.1-5.module_el8.5.0+878+851f435b.x86_64 提供)冲突
– 软件包 containerd.io-1.4.6-3.1.el8.x86_64 取代了 runc(由 runc-1.0.1-5.module_el8.5.0+878+851f435b.x86_64 提供)
– 软件包 containerd.io-1.4.6-3.1.el8.x86_64 与 runc(由 runc-1.0.1-5.module_el8.5.0+890+6b136101.x86_64 提供)冲突
– 软件包 containerd.io-1.4.6-3.1.el8.x86_64 取代了 runc(由 runc-1.0.1-5.module_el8.5.0+890+6b136101.x86_64 提供)
– 软件包 containerd.io-1.4.6-3.1.el8.x86_64 与 runc(由 runc-1.0.2-1.module_el8.5.0+911+f19012f9.x86_64 提供)冲突
– 软件包 containerd.io-1.4.6-3.1.el8.x86_64 取代了 runc(由 runc-1.0.2-1.module_el8.5.0+911+f19012f9.x86_64 提供)
– 软件包 containerd.io-1.4.8-3.1.el8.x86_64 与 runc(由 runc-1.0.0-70.rc92.module_el8.5.0+733+9bb5dffa.x86_64 提供)冲突
– 软件包 containerd.io-1.4.8-3.1.el8.x86_64 取代了 runc(由 runc-1.0.0-70.rc92.module_el8.5.0+733+9bb5dffa.x86_64 提供)
– 软件包 containerd.io-1.4.8-3.1.el8.x86_64 与 runc(由 runc-1.0.1-3.module_el8.5.0+870+f792de72.x86_64 提供)冲突
– 软件包 containerd.io-1.4.8-3.1.el8.x86_64 取代了 runc(由 runc-1.0.1-3.module_el8.5.0+870+f792de72.x86_64 提供)
– 软件包 containerd.io-1.4.8-3.1.el8.x86_64 与 runc(由 runc-1.0.1-5.module_el8.5.0+878+851f435b.x86_64 提供)冲突
– 软件包 containerd.io-1.4.8-3.1.el8.x86_64 取代了 runc(由 runc-1.0.1-5.module_el8.5.0+878+851f435b.x86_64 提供)
– 软件包 containerd.io-1.4.8-3.1.el8.x86_64 与 runc(由 runc-1.0.1-5.module_el8.5.0+890+6b136101.x86_64 提供)冲突
– 软件包 containerd.io-1.4.8-3.1.el8.x86_64 取代了 runc(由 runc-1.0.1-5.module_el8.5.0+890+6b136101.x86_64 提供)
– 软件包 containerd.io-1.4.8-3.1.el8.x86_64 与 runc(由 runc-1.0.2-1.module_el8.5.0+911+f19012f9.x86_64 提供)冲突
– 软件包 containerd.io-1.4.8-3.1.el8.x86_64 取代了 runc(由 runc-1.0.2-1.module_el8.5.0+911+f19012f9.x86_64 提供)
– 软件包 containerd.io-1.4.9-3.1.el8.x86_64 与 runc(由 runc-1.0.0-70.rc92.module_el8.5.0+733+9bb5dffa.x86_64 提供)冲突
– 软件包 containerd.io-1.4.9-3.1.el8.x86_64 取代了 runc(由 runc-1.0.0-70.rc92.module_el8.5.0+733+9bb5dffa.x86_64 提供)
– 软件包 containerd.io-1.4.9-3.1.el8.x86_64 与 runc(由 runc-1.0.1-3.module_el8.5.0+870+f792de72.x86_64 提供)冲突
– 软件包 containerd.io-1.4.9-3.1.el8.x86_64 取代了 runc(由 runc-1.0.1-3.module_el8.5.0+870+f792de72.x86_64 提供)
– 软件包 containerd.io-1.4.9-3.1.el8.x86_64 与 runc(由 runc-1.0.1-5.module_el8.5.0+878+851f435b.x86_64 提供)冲突
– 软件包 containerd.io-1.4.9-3.1.el8.x86_64 取代了 runc(由 runc-1.0.1-5.module_el8.5.0+878+851f435b.x86_64 提供)
– 软件包 containerd.io-1.4.9-3.1.el8.x86_64 与 runc(由 runc-1.0.1-5.module_el8.5.0+890+6b136101.x86_64 提供)冲突
– 软件包 containerd.io-1.4.9-3.1.el8.x86_64 取代了 runc(由 runc-1.0.1-5.module_el8.5.0+890+6b136101.x86_64 提供)
– 软件包 containerd.io-1.4.9-3.1.el8.x86_64 与 runc(由 runc-1.0.2-1.module_el8.5.0+911+f19012f9.x86_64 提供)冲突
– 软件包 containerd.io-1.4.9-3.1.el8.x86_64 取代了 runc(由 runc-1.0.2-1.module_el8.5.0+911+f19012f9.x86_64 提供)
– 软件包 containerd.io-1.4.10-3.1.el8.x86_64 与 runc(由 runc-1.0.0-70.rc92.module_el8.5.0+733+9bb5dffa.x86_64 提供)冲突
– 软件包 containerd.io-1.4.10-3.1.el8.x86_64 取代了 runc(由 runc-1.0.0-70.rc92.module_el8.5.0+733+9bb5dffa.x86_64 提供)
– 软件包 containerd.io-1.4.10-3.1.el8.x86_64 与 runc(由 runc-1.0.1-3.module_el8.5.0+870+f792de72.x86_64 提供)冲突
– 软件包 containerd.io-1.4.10-3.1.el8.x86_64 取代了 runc(由 runc-1.0.1-3.module_el8.5.0+870+f792de72.x86_64 提供)
– 软件包 containerd.io-1.4.10-3.1.el8.x86_64 与 runc(由 runc-1.0.1-5.module_el8.5.0+878+851f435b.x86_64 提供)冲突
– 软件包 containerd.io-1.4.10-3.1.el8.x86_64 取代了 runc(由 runc-1.0.1-5.module_el8.5.0+878+851f435b.x86_64 提供)
– 软件包 containerd.io-1.4.10-3.1.el8.x86_64 与 runc(由 runc-1.0.1-5.module_el8.5.0+890+6b136101.x86_64 提供)冲突
– 软件包 containerd.io-1.4.10-3.1.el8.x86_64 取代了 runc(由 runc-1.0.1-5.module_el8.5.0+890+6b136101.x86_64 提供)
– 软件包 containerd.io-1.4.10-3.1.el8.x86_64 与 runc(由 runc-1.0.2-1.module_el8.5.0+911+f19012f9.x86_64 提供)冲突
– 软件包 containerd.io-1.4.10-3.1.el8.x86_64 取代了 runc(由 runc-1.0.2-1.module_el8.5.0+911+f19012f9.x86_64 提供)
– 软件包 containerd.io-1.4.11-3.1.el8.x86_64 与 runc(由 runc-1.0.0-70.rc92.module_el8.5.0+733+9bb5dffa.x86_64 提供)冲突
– 软件包 containerd.io-1.4.11-3.1.el8.x86_64 取代了 runc(由 runc-1.0.0-70.rc92.module_el8.5.0+733+9bb5dffa.x86_64 提供)
– 软件包 containerd.io-1.4.11-3.1.el8.x86_64 与 runc(由 runc-1.0.1-3.module_el8.5.0+870+f792de72.x86_64 提供)冲突
– 软件包 containerd.io-1.4.11-3.1.el8.x86_64 取代了 runc(由 runc-1.0.1-3.module_el8.5.0+870+f792de72.x86_64 提供)
– 软件包 containerd.io-1.4.11-3.1.el8.x86_64 与 runc(由 runc-1.0.1-5.module_el8.5.0+878+851f435b.x86_64 提供)冲突
– 软件包 containerd.io-1.4.11-3.1.el8.x86_64 取代了 runc(由 runc-1.0.1-5.module_el8.5.0+878+851f435b.x86_64 提供)
– 软件包 containerd.io-1.4.11-3.1.el8.x86_64 与 runc(由 runc-1.0.1-5.module_el8.5.0+890+6b136101.x86_64 提供)冲突
– 软件包 containerd.io-1.4.11-3.1.el8.x86_64 取代了 runc(由 runc-1.0.1-5.module_el8.5.0+890+6b136101.x86_64 提供)
– 软件包 containerd.io-1.4.11-3.1.el8.x86_64 与 runc(由 runc-1.0.2-1.module_el8.5.0+911+f19012f9.x86_64 提供)冲突
– 软件包 containerd.io-1.4.11-3.1.el8.x86_64 取代了 runc(由 runc-1.0.2-1.module_el8.5.0+911+f19012f9.x86_64 提供)
– 软件包 containerd.io-1.4.12-3.1.el8.x86_64 与 runc(由 runc-1.0.0-70.rc92.module_el8.5.0+733+9bb5dffa.x86_64 提供)冲突
– 软件包 containerd.io-1.4.12-3.1.el8.x86_64 取代了 runc(由 runc-1.0.0-70.rc92.module_el8.5.0+733+9bb5dffa.x86_64 提供)
– 软件包 containerd.io-1.4.12-3.1.el8.x86_64 与 runc(由 runc-1.0.1-3.module_el8.5.0+870+f792de72.x86_64 提供)冲突
– 软件包 containerd.io-1.4.12-3.1.el8.x86_64 取代了 runc(由 runc-1.0.1-3.module_el8.5.0+870+f792de72.x86_64 提供)
– 软件包 containerd.io-1.4.12-3.1.el8.x86_64 与 runc(由 runc-1.0.1-5.module_el8.5.0+878+851f435b.x86_64 提供)冲突
– 软件包 containerd.io-1.4.12-3.1.el8.x86_64 取代了 runc(由 runc-1.0.1-5.module_el8.5.0+878+851f435b.x86_64 提供)
– 软件包 containerd.io-1.4.12-3.1.el8.x86_64 与 runc(由 runc-1.0.1-5.module_el8.5.0+890+6b136101.x86_64 提供)冲突
– 软件包 containerd.io-1.4.12-3.1.el8.x86_64 取代了 runc(由 runc-1.0.1-5.module_el8.5.0+890+6b136101.x86_64 提供)
– 软件包 containerd.io-1.4.12-3.1.el8.x86_64 与 runc(由 runc-1.0.2-1.module_el8.5.0+911+f19012f9.x86_64 提供)冲突
– 软件包 containerd.io-1.4.12-3.1.el8.x86_64 取代了 runc(由 runc-1.0.2-1.module_el8.5.0+911+f19012f9.x86_64 提供)
– 软件包 podman-catatonit-3.3.0-0.17.module_el8.5.0+874+6db8bee3.x86_64 需要 podman = 3.3.0-0.17.module_el8.5.0+874+6db8bee3,但没有提供者可以被安装
– 软件包 podman-3.3.0-0.17.module_el8.5.0+874+6db8bee3.x86_64 需要 runc >= 1.0.0-57,但没有提供者可以被安装
– 软件包 podman-catatonit-3.3.0-2.module_el8.5.0+877+1c30e0c9.x86_64 需要 podman = 3.3.0-2.module_el8.5.0+877+1c30e0c9,但没有提供者可以被安装
– 软件包 podman-3.3.0-2.module_el8.5.0+877+1c30e0c9.x86_64 需要 runc >= 1.0.0-57,但没有提供者可以被安装
– 软件包 podman-catatonit-3.3.0-4.module_el8.5.0+890+6b136101.x86_64 需要 podman = 3.3.0-4.module_el8.5.0+890+6b136101,但没有提供者可以被安装
– 软件包 podman-3.3.0-4.module_el8.5.0+890+6b136101.x86_64 需要 runc >= 1.0.0-57,但没有提供者可以被安装
– 软件包 podman-catatonit-3.3.0-8.module_el8.5.0+901+79ce9cba.x86_64 需要 podman = 3.3.0-8.module_el8.5.0+901+79ce9cba,但没有提供者可以被安装
– 软件包 podman-3.3.0-8.module_el8.5.0+901+79ce9cba.x86_64 需要 runc >= 1.0.0-57,但没有提供者可以被安装
– 软件包 podman-catatonit-3.3.1-3.module_el8.5.0+911+f19012f9.x86_64 需要 podman = 3.3.1-3.module_el8.5.0+911+f19012f9,但没有提供者可以被安装
– 软件包 podman-3.3.1-3.module_el8.5.0+911+f19012f9.x86_64 需要 runc >= 1.0.0-57,但没有提供者可以被安装
– 软件包 podman-catatonit-3.3.1-7.module_el8.5.0+914+45625a54.x86_64 需要 podman = 3.3.1-7.module_el8.5.0+914+45625a54,但没有提供者可以被安装
– 软件包 podman-3.3.1-7.module_el8.5.0+914+45625a54.x86_64 需要 runc >= 1.0.0-57,但没有提供者可以被安装
– 软件包 podman-catatonit-3.3.1-9.module_el8.6.0+938+04eb0c17.x86_64 需要 podman = 3.3.1-9.module_el8.6.0+938+04eb0c17,但没有提供者可以被安装
– 软件包 podman-3.3.1-9.module_el8.6.0+938+04eb0c17.x86_64 需要 runc >= 1.0.0-57,但没有提供者可以被安装
– 软件包 podman-catatonit-4.0.0-0.10.module_el8.6.0+944+d413f95e.x86_64 需要 podman = 4.0.0-0.10.module_el8.6.0+944+d413f95e,但没有提供者可以被安装
– 软件包 podman-4.0.0-0.10.module_el8.6.0+944+d413f95e.x86_64 需要 runc >= 1.0.0-57,但没有提供者可以被安装
– 软件包 podman-catatonit-1:3.4.1-3.module_el8.6.0+954+963caf36.x86_64 需要 podman = 1:3.4.1-3.module_el8.6.0+954+963caf36,但没有提供者可以被安装
– 软件包 podman-1:3.4.1-3.module_el8.6.0+954+963caf36.x86_64 需要 runc >= 1.0.0-57,但没有提供者可以被安装
(尝试在命令行中添加 ‘–allowerasing’ 来替换冲突的软件包 或 ‘–skip-broken’ 来跳过无法安装的软件包 或 ‘–nobest’ 来不只使用软件包的最佳候选)
此时可以使用如下命令来解决这个问题:
sudo yum install --allowerasing docker-ce docker-ce-cli containerd.io
# 5.启动docker
systemctl start docker
# 6.查看docker版本
docker version # 或者
sudo docker version
# 7.测试Hello World
docker run hello-world # 或者
sudo docker run hello-world
此时会提示找不到“hello-world”镜像,然后它会自动从仓库中拉去:
Unable to find image ‘hello-world:latest’ locally
latest: Pulling from library/hello-world
2db29710123e: Pull complete
Digest: sha256:cc15c5b292d8525effc0f89cb299f1804f3a725c8d05e158653a563f15e4f685
Status: Downloaded newer image for hello-world:latestHello from Docker!
This message shows that your installation appears to be working correctly.To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the “hello-world” image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bashShare images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/For more examples and ideas, visit:
https://docs.docker.com/get-started/
此时会有拉去成功的签名信息以及欢迎语句,当出现”Hello from Docker!”时,代表我们镜像安装成功。
# 8.查看下载的hello-world镜像
docker images #或者
sudo docker images
此时会有对应的镜像显示:
REPOSITORY TAG IMAGE ID CREATED SIZE
hello-world latest feb5d9fea6a5 2 months ago 13.3kB
到了这里才真正代表着docker安装成功并成功拉取对应的镜像。
如果需要卸载docker的话:
# 1.卸载docker
yum remove docker-ce docker-ce-cli containerd.io
# 2.删除资源
rm -rf /var/lib/docker
# /var/lib/docker docker的默认工作路径
最后再提一点,如果遇到权限问题,可以在对应的命令上添加:
sudo这个命令,意思是给同组的用户以管理员的操作权限,说白了就是提升权限的。上面的一些命令,有的我加了sudo,有的没有添加,如果遇到权限问题,直接加上即可,一般会有这样的提示:
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get “http://%2Fvar%2Frun%2Fdocker.sock/v1.24/images/json”: dial unix /var/run/docker.sock: connect: permission denied
此时在对应的命令上加上 sudo即可。
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
文章由极客之家整理,本文链接:https://www.bmabk.com/index.php/post/2723.html