随着2024年6月30日,官方停止了对CentOS 7的维护,属于CentOS 7的时代终于结束了。当然,对于CentOS 7的维护停止,大家也不用过度紧张,目前仍有部分Linux版本可以提供企业级的生产可用系统服务,比如:AlmaLinux 8.x、9.x(AlmaLinux OS - Forever-Free Enterprise-Grade Operating System)。这里提一嘴,曾经被我寄予厚望的 Rocky Linux 8,在我的安装测试过程中,Release正式版本竟然出现很多问题,和官方反馈,竟然迟迟不改,而且态度让我很失望,所以直接放弃了Rocky。目前AlmaLinux 8、9版本我都安装了,未发现问题。所以,推荐大家在生产环境使用。
关于AlmaLinux系统,官方给的定位和说明:
An Open Source, community owned and governed, forever-free enterprise Linux distribution, focused on long-term stability, providing a robust production-grade platform. AlmaLinux OS is binary compatible with RHEL®.
直译:
AlmaLinux是一个开源的,社区拥有和管理的,永远免费的企业级Linux分发,关注长期稳定,提供一个健壮的生产级别的平台。AlmaLinux 操作系统与RHEL(红帽Linux)二进制兼容。
今天,我给大家展示一下,如何在AlmaLinux 8.10系统中安装和运行Docker-ce。
首先,我们需要在Docker-ce官网下载兼容CentOS 8系统的rpm包,下载地址:
https://download.docker.com/linux/centos/8/x86_64/stable/Packages/
官方的包下载后如下:
下载好以后,我们将上面的rpm包上传到AlmaLinux 8.10系统中,然后下载安装所需的依赖包。
[root@almalinux docker-ce]# ls -ltr
总用量 108728
-rw-r--r--. 1 root root 37048204 10月 22 10:37 containerd.io-1.6.32-3.1.el8.x86_64.rpm
-rw-r--r--. 1 root root 14279736 10月 22 10:38 docker-buildx-plugin-0.14.0-1.el8.x86_64.rpm
-rw-r--r--. 1 root root 8181560 10月 22 10:38 docker-ce-cli-26.1.3-1.el8.x86_64.rpm
-rw-r--r--. 1 root root 5210852 10月 22 10:38 docker-ce-rootless-extras-26.1.3-1.el8.x86_64.rpm
-rw-r--r--. 1 root root 28542392 10月 22 10:38 docker-ce-26.1.3-1.el8.x86_64.rpm
-rw-r--r--. 1 root root 14046812 10月 22 10:38 docker-compose-plugin-2.27.0-1.el8.x86_64.rpm
-rw-r--r--. 1 root root 4010384 10月 22 10:38 docker-scan-plugin-0.23.0-3.el8.x86_64.rpm
安装的时候,由于和AlmaLinux系统自带的Podman组件冲突而安装失败,因此需要在命令里面增加一些参数
[root@almalinux docker-ce]# yum install -y ./*.rpm --downloadonly --downloaddir=./
上次元数据过期检查:0:00:49 前,执行于 2024年10月22日 星期二 10时42分32秒。
错误:
问题 1: 安装的软件包的问题 podman-4:4.9.4-1.module_el8.10.0+3845+87b84552.x86_64
- package podman-4:4.9.4-1.module_el8.10.0+3845+87b84552.x86_64 from @System requires runc >= 1.0.0-57, but none of the providers can be installed
- package podman-4:4.9.4-1.module_el8.10.0+3845+87b84552.x86_64 from appstream requires runc >= 1.0.0-57, but none of the providers can be installed
- package podman-4:4.9.4-12.module_el8.10.0+3876+e55593a8.x86_64 from appstream requires runc >= 1.0.0-57, but none of the providers can be installed
- package podman-4:4.9.4-13.module_el8.10.0+3898+7a25cb1a.x86_64 from appstream requires runc >= 1.0.0-57, but none of the providers can be installed
- package podman-4:4.9.4-13.module_el8.10.0+3901+4b80ecd7.x86_64 from appstream requires runc >= 1.0.0-57, but none of the providers can be installed
- package podman-4:4.9.4-3.module_el8.10.0+3858+6ad51f9f.x86_64 from appstream requires runc >= 1.0.0-57, but none of the providers can be installed
- package podman-4:4.9.4-4.module_el8.10.0+3862+c5a22a8d.x86_64 from appstream requires runc >= 1.0.0-57, but none of the providers can be installed
- package containerd.io-1.6.32-3.1.el8.x86_64 from @commandline conflicts with runc provided by runc-1:1.1.12-1.module_el8.10.0+3845+87b84552.x86_64 from @System
- package containerd.io-1.6.32-3.1.el8.x86_64 from @commandline obsoletes runc provided by runc-1:1.1.12-1.module_el8.10.0+3845+87b84552.x86_64 from @System
- package containerd.io-1.6.32-3.1.el8.x86_64 from @commandline conflicts with runc provided by runc-1:1.1.12-1.module_el8.10.0+3845+87b84552.x86_64 from appstream
- package containerd.io-1.6.32-3.1.el8.x86_64 from @commandline obsoletes runc provided by runc-1:1.1.12-1.module_el8.10.0+3845+87b84552.x86_64 from appstream
- package containerd.io-1.6.32-3.1.el8.x86_64 from @commandline conflicts with runc provided by runc-1:1.1.12-1.module_el8.10.0+3858+6ad51f9f.x86_64 from appstream
- package containerd.io-1.6.32-3.1.el8.x86_64 from @commandline obsoletes runc provided by runc-1:1.1.12-1.module_el8.10.0+3858+6ad51f9f.x86_64 from appstream
- package containerd.io-1.6.32-3.1.el8.x86_64 from @commandline conflicts with runc provided by runc-1:1.1.12-4.module_el8.10.0+3876+e55593a8.x86_64 from appstream
- package containerd.io-1.6.32-3.1.el8.x86_64 from @commandline obsoletes runc provided by runc-1:1.1.12-4.module_el8.10.0+3876+e55593a8.x86_64 from appstream
- package containerd.io-1.6.32-3.1.el8.x86_64 from @commandline conflicts with runc provided by runc-1:1.1.12-5.module_el8.10.0+3901+4b80ecd7.x86_64 from appstream
- package containerd.io-1.6.32-3.1.el8.x86_64 from @commandline obsoletes runc provided by runc-1:1.1.12-5.module_el8.10.0+3901+4b80ecd7.x86_64 from appstream
- 冲突的请求
- package runc-1.0.0-66.rc10.module_el8.5.0+2635+e4386a39.x86_64 from appstream is filtered out by modular filtering
- package runc-1.0.0-73.rc95.module_el8.7.0+3406+a17c4180.x86_64 from appstream is filtered out by modular filtering
- package runc-1:1.1.12-1.module_el8.10.0+3846+c31e1972.x86_64 from appstream is filtered out by modular filtering
问题 2: 安装的软件包的问题 containers-common-2:1-81.module_el8.10.0+3792+03eaed9c.x86_64
- package containers-common-2:1-81.module_el8.10.0+3792+03eaed9c.x86_64 from @System requires runc, but none of the providers can be installed
- package containers-common-2:1-81.module_el8.10.0+3792+03eaed9c.x86_64 from appstream requires runc, but none of the providers can be installed
- package containers-common-2:1-81.module_el8.10.0+3858+6ad51f9f.x86_64 from appstream requires runc, but none of the providers can be installed
- package containers-common-2:1-82.module_el8.10.0+3876+e55593a8.x86_64 from appstream requires runc, but none of the providers can be installed
- package containers-common-2:1-82.module_el8.10.0+3901+4b80ecd7.x86_64 from appstream requires runc, but none of the providers can be installed
- package containerd.io-1.6.32-3.1.el8.x86_64 from @commandline conflicts with runc provided by runc-1:1.1.12-1.module_el8.10.0+3845+87b84552.x86_64 from @System
- package containerd.io-1.6.32-3.1.el8.x86_64 from @commandline obsoletes runc provided by runc-1:1.1.12-1.module_el8.10.0+3845+87b84552.x86_64 from @System
- package containerd.io-1.6.32-3.1.el8.x86_64 from @commandline conflicts with runc provided by runc-1:1.1.12-1.module_el8.10.0+3845+87b84552.x86_64 from appstream
- package containerd.io-1.6.32-3.1.el8.x86_64 from @commandline obsoletes runc provided by runc-1:1.1.12-1.module_el8.10.0+3845+87b84552.x86_64 from appstream
- package containerd.io-1.6.32-3.1.el8.x86_64 from @commandline conflicts with runc provided by runc-1:1.1.12-1.module_el8.10.0+3858+6ad51f9f.x86_64 from appstream
- package containerd.io-1.6.32-3.1.el8.x86_64 from @commandline obsoletes runc provided by runc-1:1.1.12-1.module_el8.10.0+3858+6ad51f9f.x86_64 from appstream
- package containerd.io-1.6.32-3.1.el8.x86_64 from @commandline conflicts with runc provided by runc-1:1.1.12-4.module_el8.10.0+3876+e55593a8.x86_64 from appstream
- package containerd.io-1.6.32-3.1.el8.x86_64 from @commandline obsoletes runc provided by runc-1:1.1.12-4.module_el8.10.0+3876+e55593a8.x86_64 from appstream
- package containerd.io-1.6.32-3.1.el8.x86_64 from @commandline conflicts with runc provided by runc-1:1.1.12-5.module_el8.10.0+3901+4b80ecd7.x86_64 from appstream
- package containerd.io-1.6.32-3.1.el8.x86_64 from @commandline obsoletes runc provided by runc-1:1.1.12-5.module_el8.10.0+3901+4b80ecd7.x86_64 from appstream
- package docker-ce-3:26.1.3-1.el8.x86_64 from @commandline requires containerd.io >= 1.6.24, but none of the providers can be installed
- 冲突的请求
- package runc-1.0.0-56.rc5.dev.git2abd837.module_el8.3.0+2044+12421f43.x86_64 from appstream is filtered out by modular filtering
- package runc-1.0.0-66.rc10.module_el8.5.0+2635+e4386a39.x86_64 from appstream is filtered out by modular filtering
- package runc-1.0.0-73.rc95.module_el8.7.0+3406+a17c4180.x86_64 from appstream is filtered out by modular filtering
- pa