当前位置: 首页 > news >正文

在RHEL 9.X上安装 Docker最新版(28.3.3)

前面是指南,后面是工作日志。

步骤 1:卸载旧版本

sudo dnf remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine
步骤 2:添加 Docker CE 仓库

sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
步骤 3:解决依赖冲突
由于 RHEL 9.4 的默认仓库与 Docker 仓库存在冲突,需排除部分包:


sudo dnf install docker-ce docker-ce-cli containerd.io --allowerasing -y
--allowerasing 允许替换冲突的依赖包(如 containerd.io 会替换系统自带的 runc)。

步骤 4:启动并启用服务

sudo systemctl enable --now docker

[root@bastion harbor]# sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

Updating Subscription Management repositories.

Unable to read consumer identity

This system is not registered with an entitlement server. You can use "rhc" or "subscription-manager" to register.

Adding repo from: https://download.docker.com/linux/centos/docker-ce.repo

[root@bastion harbor]#

[root@bastion yum.repos.d]# sudo dnf install docker-ce docker-ce-cli containerd.io --allowerasing -y

Updating Subscription Management repositories.

Unable to read consumer identity

This system is not registered with an entitlement server. You can use "rhc" or "subscription-manager" to register.

Docker CE Stable - x86_64 46 kB/s | 78 kB 00:01

Dependencies resolved.

========================================================================================================================================================================

Package Architecture Version Repository Size

========================================================================================================================================================================

Installing:

containerd.io x86_64 1.7.27-3.1.el9 docker-ce-stable 44 M

docker-ce x86_64 3:28.3.3-1.el9 docker-ce-stable 21 M

docker-ce-cli x86_64 1:28.3.3-1.el9 docker-ce-stable 8.6 M

Installing weak dependencies:

docker-buildx-plugin x86_64 0.26.1-1.el9 docker-ce-stable 16 M

docker-ce-rootless-extras x86_64 28.3.3-1.el9 docker-ce-stable 3.4 M

docker-compose-plugin x86_64 2.39.1-1.el9 docker-ce-stable 15 M

Transaction Summary

========================================================================================================================================================================

Install 6 Packages

Total download size: 108 M

Installed size: 435 M

Downloading Packages:

(1/6): docker-buildx-plugin-0.26.1-1.el9.x86_64.rpm 1.0 MB/s | 16 MB 00:15

(2/6): docker-ce-cli-28.3.3-1.el9.x86_64.rpm 637 kB/s | 8.6 MB 00:13

(3/6): docker-ce-rootless-extras-28.3.3-1.el9.x86_64.rpm 490 kB/s | 3.4 MB 00:07

(4/6): docker-ce-28.3.3-1.el9.x86_64.rpm 545 kB/s | 21 MB 00:38

(5/6): containerd.io-1.7.27-3.1.el9.x86_64.rpm 1.0 MB/s | 44 MB 00:42

(6/6): docker-compose-plugin-2.39.1-1.el9.x86_64.rpm 1.6 MB/s | 15 MB 00:09

------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Total 2.3 MB/s | 108 MB 00:46

Docker CE Stable - x86_64 3.0 kB/s | 1.6 kB 00:00

Importing GPG key 0x621E9F35:

Userid : "Docker Release (CE rpm) "

Fingerprint: 060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35

From : https://download.docker.com/linux/centos/gpg

Key imported successfully

Running transaction check

Transaction check succeeded.

Running transaction test

Transaction test succeeded.

Running transaction

Preparing : 1/1

Installing : docker-buildx-plugin-0.26.1-1.el9.x86_64 1/6

Running scriptlet: docker-buildx-plugin-0.26.1-1.el9.x86_64 1/6

Installing : docker-compose-plugin-2.39.1-1.el9.x86_64 2/6

Running scriptlet: docker-compose-plugin-2.39.1-1.el9.x86_64 2/6

Installing : docker-ce-cli-1:28.3.3-1.el9.x86_64 3/6

Running scriptlet: docker-ce-cli-1:28.3.3-1.el9.x86_64 3/6

Installing : containerd.io-1.7.27-3.1.el9.x86_64 4/6

Running scriptlet: containerd.io-1.7.27-3.1.el9.x86_64 4/6

Installing : docker-ce-rootless-extras-28.3.3-1.el9.x86_64 5/6

Running scriptlet: docker-ce-rootless-extras-28.3.3-1.el9.x86_64 5/6

Installing : docker-ce-3:28.3.3-1.el9.x86_64 6/6

Running scriptlet: docker-ce-3:28.3.3-1.el9.x86_64 6/6

Verifying : containerd.io-1.7.27-3.1.el9.x86_64 1/6

Verifying : docker-buildx-plugin-0.26.1-1.el9.x86_64 2/6

Verifying : docker-ce-3:28.3.3-1.el9.x86_64 3/6

Verifying : docker-ce-cli-1:28.3.3-1.el9.x86_64 4/6

Verifying : docker-ce-rootless-extras-28.3.3-1.el9.x86_64 5/6

Verifying : docker-compose-plugin-2.39.1-1.el9.x86_64 6/6

Installed products updated.

Installed:

containerd.io-1.7.27-3.1.el9.x86_64 docker-buildx-plugin-0.26.1-1.el9.x86_64 docker-ce-3:28.3.3-1.el9.x86_64 docker-ce-cli-1:28.3.3-1.el9.x86_64

docker-ce-rootless-extras-28.3.3-1.el9.x86_64 docker-compose-plugin-2.39.1-1.el9.x86_64

Complete!

[root@bastion yum.repos.d]# sudo systemctl start docker

[root@bastion yum.repos.d]# systemctl --no-pager status docker

● docker.service - Docker Application Container Engine

Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; preset: disabled)

Active: active (running) since Wed 2025-08-13 11:03:56 CST; 9s ago

TriggeredBy: ● docker.socket

Docs: https://docs.docker.com

Main PID: 34362 (dockerd)

Tasks: 10

Memory: 26.7M

CPU: 479ms

CGroup: /system.slice/docker.service

└─34362 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

Aug 13 11:03:54 bastion.downloadocp.com dockerd[34362]: time="2025-08-13T11:03:54.189221994+08:00" level=info msg="CDI directory does not exist, skipping: f…var/run/cdi

Aug 13 11:03:54 bastion.downloadocp.com dockerd[34362]: time="2025-08-13T11:03:54.209069359+08:00" level=info msg="Creating a containerd client" address=/ru…imeout=1m0s

Aug 13 11:03:54 bastion.downloadocp.com dockerd[34362]: time="2025-08-13T11:03:54.509959172+08:00" level=info msg="Loading containers: start."

Aug 13 11:03:55 bastion.downloadocp.com dockerd[34362]: time="2025-08-13T11:03:55.541325673+08:00" level=info msg="Loading containers: done."

Aug 13 11:03:55 bastion.downloadocp.com dockerd[34362]: time="2025-08-13T11:03:55.611857336+08:00" level=info msg="Docker daemon" commit=bea959c containerd-…sion=28.3.3

Aug 13 11:03:55 bastion.downloadocp.com dockerd[34362]: time="2025-08-13T11:03:55.612030376+08:00" level=info msg="Initializing buildkit"

Aug 13 11:03:55 bastion.downloadocp.com dockerd[34362]: time="2025-08-13T11:03:55.984691325+08:00" level=info msg="Completed buildkit initialization"

Aug 13 11:03:56 bastion.downloadocp.com dockerd[34362]: time="2025-08-13T11:03:56.000316561+08:00" level=info msg="Daemon has completed initialization"

Aug 13 11:03:56 bastion.downloadocp.com systemd[1]: Started Docker Application Container Engine.

Aug 13 11:03:56 bastion.downloadocp.com dockerd[34362]: time="2025-08-13T11:03:56.001632717+08:00" level=info msg="API listen on /run/docker.sock"

Hint: Some lines were ellipsized, use -l to show in full.

[root@bastion yum.repos.d]# sudo systemctl enable docker

Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /usr/lib/systemd/system/docker.service.

[root@bastion yum.repos.d]# docker version

Client: Docker Engine - Community

Version: 28.3.3

API version: 1.51

Go version: go1.24.5

Git commit: 980b856

Built: Fri Jul 25 11:37:02 2025

OS/Arch: linux/amd64

Context: default

Server: Docker Engine - Community

Engine:

Version: 28.3.3

API version: 1.51 (minimum version 1.24)

Go version: go1.24.5

Git commit: bea959c

Built: Fri Jul 25 11:33:59 2025

OS/Arch: linux/amd64

Experimental: false

containerd:

Version: 1.7.27

GitCommit: 05044ec0a9a75232cad458027ca83437aae3f4da

runc:

Version: 1.2.5

GitCommit: v1.2.5-0-g59923ef

docker-init:

Version: 0.19.0

GitCommit: de40ad0

[root@bastion yum.repos.d]#

http://www.dtcms.com/a/329360.html

相关文章:

  • 嵌入式|VNC实现开发板远程Debian桌面
  • Spring 源码学习(十)—— DispatcherServlet
  • 专题:2025抖音电商与微短剧行业研究报告|附150+份报告PDF汇总下载
  • 小迪23年-32~40——java简单回顾
  • Hive 创建事务表的方法
  • 机器学习-----DBSCAN算法
  • 进阶向:Python编写自动化邮件发送程序
  • C++多态:理解面向对象的“一个接口,多种实现”
  • [AXI5]AXI协议中awsize和awlen在Vector Atomic地址膨胀中的作用
  • PCIE 配置空间 拓展能力 定义
  • Linux编程 —— framebuffer
  • AJAX学习(2)
  • AI 创作系列(30)海狸 IM:小而全、易二开、快迭代
  • 八爪鱼和影刀的区别和优缺点
  • 【题解】[CQOI2006] 洛谷P4196 凸多边形 /【模板】半平面交
  • AI时代程序员的进化:从代码工人到创意架构师-优雅草卓伊凡引言:AI浪潮下的职业重构
  • Celery在Django中的应用
  • 排序总结---保研机试极限复习
  • 亚马逊聚焦战略2.0:从资源分散到价值聚焦的商业重构逻辑
  • 北京JAVA基础面试30天打卡09
  • Java面试宝典:ZGC
  • 【自动化运维神器Ansible】playbook主机清单变量深度解析:主机变量与组变量的实战应用
  • InfluxDB数据恢复
  • 在JVM跑JavaScript脚本 | Oracle GraalJS 简介与实践
  • MySQL数据库核心操作解析
  • 数据库基础—SQL语句总结及在开发时
  • 如何使用 Ollama 在本地设置并运行 Qwen3
  • 2025年高效能工程项目管理软件推荐榜单:AI重构工程进度可视化与资源动态调度体系
  • 【国内电子数据取证厂商龙信科技】RAID存储技术
  • Spring Boot 集成 机器人指令中枢ROS2工业机械臂控制网关