【Docker】Docker社区版针对各系统的最新版本

        Docker社区版经过多年的更新迭代,目前最新版已经支持到EL9、EL10系统了,而针对EL7、EL7系统的Docker社区版,已经于2024年停止更新。

        适配 EL7 系统的 Docker 社区版最后一个版本为 26.1.4,最后的更新日期为2024年6月10日。

        适配 EL8 系统的 Docker 社区版最后一个版本为 26.1.3,最后的更新日期为2024年5月21日。

        目前,适配 EL9、EL10 系统的Docker社区版版本已经更新到了29.0.4。

        下面是适配 EL9 系统(测试使用的是Almalinux-9.6)相关的 rpm 包:

-rw-r--r-- 1 root root 12942495 11月 26 14:41 cagent-1.9.7-1.el9.x86_64.rpm
-rw-r--r-- 1 root root  3963981 11月 26 14:42 docker-scan-plugin-0.23.0-3.el9.x86_64.rpm
-rw-r--r-- 1 root root 35809160 11月 26 14:42 containerd.io-2.1.5-1.el9.x86_64.rpm
-rw-r--r-- 1 root root  8746305 11月 26 14:42 docker-ce-cli-29.0.4-1.el9.x86_64.rpm
-rw-r--r-- 1 root root  3599642 11月 26 14:42 docker-ce-rootless-extras-29.0.4-1.el9.x86_64.rpm
-rw-r--r-- 1 root root 17912671 11月 26 14:42 docker-buildx-plugin-0.30.0-1.el9.x86_64.rpm
-rw-r--r-- 1 root root  7761258 11月 26 14:42 docker-model-plugin-1.0.1-1.el9.x86_64.rpm
-rw-r--r-- 1 root root 15762300 11月 26 14:42 docker-compose-plugin-2.40.3-1.el9.x86_64.rpm
-rw-r--r-- 1 root root 22391560 11月 26 14:42 docker-ce-29.0.4-1.el9.x86_64.rpm

cagent 这个包比较新,发布时间为2025年11月6日,这个包的功能目前还是实验性的,你可以使用这个工具来定 AI 代理,让这些 AI 代理以一个团队的形式来工作。

使用范例:

1)设置环境变量

export OPENAI_API_KEY=<your_api_key_here>    # For OpenAI models
export ANTHROPIC_API_KEY=<your_api_key_here> # For Anthropic models
export GOOGLE_API_KEY=<your_api_key_here>    # For Gemini models

2)编写openAI模型的剧本

# assistant.yaml

agents:
  root:
    model: openai/gpt-5-mini
    description: A helpful AI assistant
    instruction: |
      You are a knowledgeable assistant that helps users with various tasks.
      Be helpful, accurate, and concise in your responses.

3)使用 cagent 来运行这个剧本

cagent run assistant.yaml

DockerCE的安装依旧狠丝滑

[root@almalinux-9 docke-ce-29.0.4-el9]# yum install -y ./*.rpm
上次元数据过期检查:0:03:47 前,执行于 2025年11月26日 星期三 15时09分38秒。
依赖关系解决。
==================================================================================================================================================================================================================
 软件包                                                       架构                                      版本                                                仓库                                             大小
==================================================================================================================================================================================================================
安装:
 cagent                                                       x86_64                                    1.9.7-1.el9                                         @commandline                                     12 M
 containerd.io                                                x86_64                                    2.1.5-1.el9                                         @commandline                                     34 M
 docker-buildx-plugin                                         x86_64                                    0.30.0-1.el9                                        @commandline                                     17 M
 docker-ce                                                    x86_64                                    3:29.0.4-1.el9                                      @commandline                                     21 M
 docker-ce-cli                                                x86_64                                    1:29.0.4-1.el9                                      @commandline                                    8.3 M
 docker-ce-rootless-extras                                    x86_64                                    29.0.4-1.el9                                        @commandline                                    3.4 M
 docker-compose-plugin                                        x86_64                                    2.40.3-1.el9                                        @commandline                                     15 M
 docker-model-plugin                                          x86_64                                    1.0.1-1.el9                                         @commandline                                    7.4 M
 docker-scan-plugin                                           x86_64                                    0.23.0-3.el9                                        @commandline                                    3.8 M

事务概要
==================================================================================================================================================================================================================
安装  9 软件包

总计:123 M
安装大小:487 M
下载软件包:
运行事务检查
事务检查成功。
运行事务测试
事务测试成功。
运行事务
  准备中  :                                                                                                                                                                                                   1/1 
  安装    : docker-model-plugin-1.0.1-1.el9.x86_64                                                                                                                                                            1/9 
  运行脚本: docker-model-plugin-1.0.1-1.el9.x86_64                                                                                                                                                            1/9 
  安装    : docker-buildx-plugin-0.30.0-1.el9.x86_64                                                                                                                                                          2/9 
  运行脚本: docker-buildx-plugin-0.30.0-1.el9.x86_64                                                                                                                                                          2/9 
  安装    : docker-compose-plugin-2.40.3-1.el9.x86_64                                                                                                                                                         3/9 
  运行脚本: docker-compose-plugin-2.40.3-1.el9.x86_64                                                                                                                                                         3/9 
  安装    : docker-scan-plugin-0.23.0-3.el9.x86_64                                                                                                                                                            4/9 
  运行脚本: docker-scan-plugin-0.23.0-3.el9.x86_64                                                                                                                                                            4/9 
  安装    : docker-ce-cli-1:29.0.4-1.el9.x86_64                                                                                                                                                               5/9 
  运行脚本: docker-ce-cli-1:29.0.4-1.el9.x86_64                                                                                                                                                               5/9 
  安装    : containerd.io-2.1.5-1.el9.x86_64                                                                                                                                                                  6/9 
  运行脚本: containerd.io-2.1.5-1.el9.x86_64                                                                                                                                                                  6/9 
  安装    : docker-ce-rootless-extras-29.0.4-1.el9.x86_64                                                                                                                                                     7/9 
  运行脚本: docker-ce-rootless-extras-29.0.4-1.el9.x86_64                                                                                                                                                     7/9 
  安装    : docker-ce-3:29.0.4-1.el9.x86_64                                                                                                                                                                   8/9 
  运行脚本: docker-ce-3:29.0.4-1.el9.x86_64                                                                                                                                                                   8/9 
  安装    : cagent-1.9.7-1.el9.x86_64                                                                                                                                                                         9/9 
  运行脚本: cagent-1.9.7-1.el9.x86_64                                                                                                                                                                         9/9 
  验证    : cagent-1.9.7-1.el9.x86_64                                                                                                                                                                         1/9 
  验证    : containerd.io-2.1.5-1.el9.x86_64                                                                                                                                                                  2/9 
  验证    : docker-buildx-plugin-0.30.0-1.el9.x86_64                                                                                                                                                          3/9 
  验证    : docker-ce-3:29.0.4-1.el9.x86_64                                                                                                                                                                   4/9 
  验证    : docker-ce-cli-1:29.0.4-1.el9.x86_64                                                                                                                                                               5/9 
  验证    : docker-ce-rootless-extras-29.0.4-1.el9.x86_64                                                                                                                                                     6/9 
  验证    : docker-compose-plugin-2.40.3-1.el9.x86_64                                                                                                                                                         7/9 
  验证    : docker-model-plugin-1.0.1-1.el9.x86_64                                                                                                                                                            8/9 
  验证    : docker-scan-plugin-0.23.0-3.el9.x86_64                                                                                                                                                            9/9 

已安装:
  cagent-1.9.7-1.el9.x86_64                      containerd.io-2.1.5-1.el9.x86_64           docker-buildx-plugin-0.30.0-1.el9.x86_64  docker-ce-3:29.0.4-1.el9.x86_64         docker-ce-cli-1:29.0.4-1.el9.x86_64 
  docker-ce-rootless-extras-29.0.4-1.el9.x86_64  docker-compose-plugin-2.40.3-1.el9.x86_64  docker-model-plugin-1.0.1-1.el9.x86_64    docker-scan-plugin-0.23.0-3.el9.x86_64 

完毕!

Docker相关服务启动

[root@almalinux-9 docke-ce-29.0.4-el9]# systemctl start docker.socket docker.service containerd.service 
[root@almalinux-9 docke-ce-29.0.4-el9]# systemctl status docker.socket docker.service containerd.service 
● docker.socket - Docker Socket for the API
     Loaded: loaded (/usr/lib/systemd/system/docker.socket; disabled; preset: disabled)
     Active: active (running) since Wed 2025-11-26 15:14:11 CST; 8s ago
      Until: Wed 2025-11-26 15:14:11 CST; 8s ago
   Triggers: ● docker.service
     Listen: /run/docker.sock (Stream)
      Tasks: 0 (limit: 48541)
     Memory: 0B
        CPU: 2ms
     CGroup: /system.slice/docker.socket

11月 26 15:14:11 almalinux-9.6 systemd[1]: Starting Docker Socket for the API...
11月 26 15:14:11 almalinux-9.6 systemd[1]: Listening on Docker Socket for the API.

● docker.service - Docker Application Container Engine
     Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; preset: disabled)
     Active: active (running) since Wed 2025-11-26 15:14:12 CST; 7s ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 7935 (dockerd)
      Tasks: 8
     Memory: 23.1M
        CPU: 561ms
     CGroup: /system.slice/docker.service
             └─7935 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

11月 26 15:14:11 almalinux-9.6 dockerd[7935]: time="2025-11-26T15:14:11.793007528+08:00" level=info msg="Deleting nftables IPv4 rules" error="exit status 1"
11月 26 15:14:11 almalinux-9.6 dockerd[7935]: time="2025-11-26T15:14:11.801187360+08:00" level=info msg="Deleting nftables IPv6 rules" error="exit status 1"
11月 26 15:14:12 almalinux-9.6 dockerd[7935]: time="2025-11-26T15:14:12.310119854+08:00" level=info msg="Loading containers: done."
11月 26 15:14:12 almalinux-9.6 dockerd[7935]: time="2025-11-26T15:14:12.321003479+08:00" level=info msg="Docker daemon" commit=4612690 containerd-snapshotter=true storage-driver=overlayfs version=29.0.4
11月 26 15:14:12 almalinux-9.6 dockerd[7935]: time="2025-11-26T15:14:12.321176654+08:00" level=info msg="Initializing buildkit"
11月 26 15:14:12 almalinux-9.6 dockerd[7935]: time="2025-11-26T15:14:12.346733918+08:00" level=warning msg="git source cannot be enabled: failed to find git binary: exec: \"git\": executable file not found in >
11月 26 15:14:12 almalinux-9.6 dockerd[7935]: time="2025-11-26T15:14:12.351539342+08:00" level=info msg="Completed buildkit initialization"
11月 26 15:14:12 almalinux-9.6 dockerd[7935]: time="2025-11-26T15:14:12.359057877+08:00" level=info msg="Daemon has completed initialization"
11月 26 15:14:12 almalinux-9.6 dockerd[7935]: time="2025-11-26T15:14:12.359119728+08:00" level=info msg="API listen on /run/docker.sock"
11月 26 15:14:12 almalinux-9.6 systemd[1]: Started Docker Application Container Engine.

● containerd.service - containerd container runtime
     Loaded: loaded (/usr/lib/systemd/system/containerd.service; disabled; preset: disabled)
     Active: active (running) since Wed 2025-11-26 15:14:11 CST; 8s ago
       Docs: https://containerd.io
    Process: 7924 ExecStartPre=/sbin/modprobe overlay (code=exited, status=0/SUCCESS)
   Main PID: 7925 (containerd)
      Tasks: 8
     Memory: 16.8M
        CPU: 88ms
     CGroup: /system.slice/containerd.service
             └─7925 /usr/bin/containerd

11月 26 15:14:11 almalinux-9.6 containerd[7925]: time="2025-11-26T15:14:11.527186307+08:00" level=info msg="skip loading plugin" error="skip plugin: tracing endpoint not configured" id=io.containerd.internal.v>
11月 26 15:14:11 almalinux-9.6 containerd[7925]: time="2025-11-26T15:14:11.527193264+08:00" level=info msg="loading plugin" id=io.containerd.ttrpc.v1.otelttrpc type=io.containerd.ttrpc.v1
11月 26 15:14:11 almalinux-9.6 containerd[7925]: time="2025-11-26T15:14:11.527201606+08:00" level=info msg="loading plugin" id=io.containerd.grpc.v1.healthcheck type=io.containerd.grpc.v1
11月 26 15:14:11 almalinux-9.6 containerd[7925]: time="2025-11-26T15:14:11.527210403+08:00" level=info msg="loading plugin" id=io.containerd.nri.v1.nri type=io.containerd.nri.v1
11月 26 15:14:11 almalinux-9.6 containerd[7925]: time="2025-11-26T15:14:11.527226735+08:00" level=info msg="runtime interface created"
11月 26 15:14:11 almalinux-9.6 containerd[7925]: time="2025-11-26T15:14:11.527231919+08:00" level=info msg="created NRI interface"
11月 26 15:14:11 almalinux-9.6 containerd[7925]: time="2025-11-26T15:14:11.528680070+08:00" level=info msg=serving... address=/run/containerd/containerd.sock.ttrpc
11月 26 15:14:11 almalinux-9.6 containerd[7925]: time="2025-11-26T15:14:11.528774742+08:00" level=info msg=serving... address=/run/containerd/containerd.sock
11月 26 15:14:11 almalinux-9.6 systemd[1]: Started containerd container runtime.
11月 26 15:14:11 almalinux-9.6 containerd[7925]: time="2025-11-26T15:14:11.539340151+08:00" level=info msg="containerd successfully booted in 0.055145s"

Docker-ce-29.0.4-el9的卸载

# 停止相关服务
systemctl stop docker.service docker.socket containerd.service

# 禁止服务自启
systemctl disable docker.service docker.socket containerd.service

# 删除相关 rmp 包
rpm -e cagent \
       containerd.io \
       docker-buildx-plugin \
       docker-ce \
       docker-ce-cli \
       docker-ce-rootless-extras \
       docker-compose-plugin \
       docker-model-plugin \
       docker-scan-plugin

# 删除核心数据目录(镜像、容器、卷等)
rm -rf /var/lib/docker /var/lib/containerd
 
# 删除配置文件
rm -rf /etc/docker /etc/default/docker
 
# 删除用户配置
rm -rf ~/.docker
 
# 删除日志文件
rm -rf /var/log/docker /var/log/containerd

参考:

https://docs.docker.com/ai/cagent/

https://download.docker.com/linux/centos/9/x86_64/stable/Packages/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

cnskylee

技术分享我是认真的,期待您打赏

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值