欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 健康 > 养生 > 在rocky linux 9.5上在线安装 docker

在rocky linux 9.5上在线安装 docker

2025/6/8 13:51:41 来源:https://blog.csdn.net/openeis/article/details/148485737  浏览:    关键词:在rocky linux 9.5上在线安装 docker

前面是指南,后面是日志

sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo


 

sudo dnf install docker-ce docker-ce-cli containerd.io -y


 

docker version


 

sudo systemctl start docker

sudo systemctl status docker

sudo systemctl enable docker

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

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

[root@rocky05 ~]# dnf install docker-ce docker-ce-cli containerd.io

Docker CE Stable - x86_64 41 kB/s | 73 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.2.2-1.el9 docker-ce-stable 20 M

docker-ce-cli x86_64 1:28.2.2-1.el9 docker-ce-stable 8.5 M

Installing weak dependencies:

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

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

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

Transaction Summary

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

Install 6 Packages

Total download size: 107 M

Installed size: 430 M

Is this ok [y/N]: y

Downloading Packages:

[MIRROR] docker-buildx-plugin-0.24.0-1.el9.x86_64.rpm: Curl error (35): SSL connect error for https://download.docker.com/linux/centos/9/x86_64/stable/Packages/docker-bu

ildx-plugin-0.24.0-1.el9.x86_64.rpm [OpenSSL SSL_connect: Connection reset by peer in connection to download.docker.com:443 ]

[MIRROR] docker-buildx-plugin-0.24.0-1.el9.x86_64.rpm: Curl error (35): SSL connect error for https://download.docker.com/linux/centos/9/x86_64/stable/Packages/docker-bu

ildx-plugin-0.24.0-1.el9.x86_64.rpm [OpenSSL SSL_connect: Connection reset by peer in connection to download.docker.com:443 ]

(1/6): docker-buildx-plugin-0.24.0-1.el9.x86_64.rpm 747 kB/s | 16 MB 00:21

(2/6): docker-ce-28.2.2-1.el9.x86_64.rpm 771 kB/s | 20 MB 00:27

(3/6): docker-ce-rootless-extras-28.2.2-1.el9.x86_64.rpm 550 kB/s | 3.4 MB 00:06

(4/6): docker-ce-cli-28.2.2-1.el9.x86_64.rpm 648 kB/s | 8.5 MB 00:13

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

(6/6): docker-compose-plugin-2.36.2-1.el9.x86_64.rpm 1.3 MB/s | 15 MB 00:11

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

Total 2.4 MB/s | 107 MB 00:44

Docker CE Stable - x86_64 2.7 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

Is this ok [y/N]: y

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.24.0-1.el9.x86_64 1/6

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

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

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

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

Running scriptlet: docker-ce-cli-1:28.2.2-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.2.2-1.el9.x86_64 5/6

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

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

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

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

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

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

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

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

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

Installed:

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

docker-ce-rootless-extras-28.2.2-1.el9.x86_64 docker-compose-plugin-2.36.2-1.el9.x86_64

Complete!

[root@rocky05 ~]# docker version

Client: Docker Engine - Community

Version: 28.2.2

API version: 1.50

Go version: go1.24.3

Git commit: e6534b4

Built: Fri May 30 12:09:15 2025

OS/Arch: linux/amd64

Context: default

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

[root@rocky05 ~]# sudo systemctl start docker

sudo systemctl status docker

sudo systemctl enable docker

● docker.service - Docker Application Container Engine

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

Active: active (running) since Sat 2025-06-07 06:32:37 CST; 44ms ago

TriggeredBy: ● docker.socket

Docs: https://docs.docker.com

Main PID: 34067 (dockerd)

Tasks: 10

Memory: 28.5M

CPU: 528ms

CGroup: /system.slice/docker.service

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

Jun 07 06:32:35 rocky05 dockerd[34067]: time="2025-06-07T06:32:35.707892253+08:00" level=info msg="Loading containers: start."

Jun 07 06:32:36 rocky05 dockerd[34067]: time="2025-06-07T06:32:36.712899398+08:00" level=info msg="Loading containers: done."

Jun 07 06:32:36 rocky05 dockerd[34067]: time="2025-06-07T06:32:36.824553180+08:00" level=info msg="Docker daemon" commit=45873be containerd-snapshotter=false storage-d>

Jun 07 06:32:36 rocky05 dockerd[34067]: time="2025-06-07T06:32:36.824718727+08:00" level=info msg="Initializing buildkit"

Jun 07 06:32:36 rocky05 dockerd[34067]: time="2025-06-07T06:32:36.906651330+08:00" level=warning msg="CDI setup error /etc/cdi: failed to monitor for changes: no such >

Jun 07 06:32:36 rocky05 dockerd[34067]: time="2025-06-07T06:32:36.906689604+08:00" level=warning msg="CDI setup error /var/run/cdi: failed to monitor for changes: no s>

Jun 07 06:32:37 rocky05 dockerd[34067]: time="2025-06-07T06:32:37.073381775+08:00" level=info msg="Completed buildkit initialization"

Jun 07 06:32:37 rocky05 dockerd[34067]: time="2025-06-07T06:32:37.086968332+08:00" level=info msg="Daemon has completed initialization"

Jun 07 06:32:37 rocky05 systemd[1]: Started Docker Application Container Engine.

Jun 07 06:32:37 rocky05 dockerd[34067]: time="2025-06-07T06:32:37.087475008+08:00" level=info msg="API listen on /run/docker.sock"

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

[root@rocky05 ~]# sudo systemctl status docker

● docker.service - Docker Application Container Engine

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

Active: active (running) since Sat 2025-06-07 06:32:37 CST; 13s ago

TriggeredBy: ● docker.socket

Docs: https://docs.docker.com

Main PID: 34067 (dockerd)

Tasks: 10

Memory: 28.5M

CPU: 531ms

CGroup: /system.slice/docker.service

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

Jun 07 06:32:35 rocky05 dockerd[34067]: time="2025-06-07T06:32:35.707892253+08:00" level=info msg="Loading containers: start."

Jun 07 06:32:36 rocky05 dockerd[34067]: time="2025-06-07T06:32:36.712899398+08:00" level=info msg="Loading containers: done."

Jun 07 06:32:36 rocky05 dockerd[34067]: time="2025-06-07T06:32:36.824553180+08:00" level=info msg="Docker daemon" commit=45873be containerd-snapshotter=false storage-d>

Jun 07 06:32:36 rocky05 dockerd[34067]: time="2025-06-07T06:32:36.824718727+08:00" level=info msg="Initializing buildkit"

Jun 07 06:32:36 rocky05 dockerd[34067]: time="2025-06-07T06:32:36.906651330+08:00" level=warning msg="CDI setup error /etc/cdi: failed to monitor for changes: no such >

Jun 07 06:32:36 rocky05 dockerd[34067]: time="2025-06-07T06:32:36.906689604+08:00" level=warning msg="CDI setup error /var/run/cdi: failed to monitor for changes: no s>

Jun 07 06:32:37 rocky05 dockerd[34067]: time="2025-06-07T06:32:37.073381775+08:00" level=info msg="Completed buildkit initialization"

Jun 07 06:32:37 rocky05 dockerd[34067]: time="2025-06-07T06:32:37.086968332+08:00" level=info msg="Daemon has completed initialization"

Jun 07 06:32:37 rocky05 systemd[1]: Started Docker Application Container Engine.

Jun 07 06:32:37 rocky05 dockerd[34067]: time="2025-06-07T06:32:37.087475008+08:00" level=info msg="API listen on /run/docker.sock"

[root@rocky05 ~]# sudo systemctl enable docker

[root@rocky05 ~]# sudo systemctl status docker -l

● docker.service - Docker Application Container Engine

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

Active: active (running) since Sat 2025-06-07 06:32:37 CST; 30s ago

TriggeredBy: ● docker.socket

Docs: https://docs.docker.com

Main PID: 34067 (dockerd)

Tasks: 10

Memory: 28.5M

CPU: 532ms

CGroup: /system.slice/docker.service

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

Jun 07 06:32:35 rocky05 dockerd[34067]: time="2025-06-07T06:32:35.707892253+08:00" level=info msg="Loading containers: start."

Jun 07 06:32:36 rocky05 dockerd[34067]: time="2025-06-07T06:32:36.712899398+08:00" level=info msg="Loading containers: done."

Jun 07 06:32:36 rocky05 dockerd[34067]: time="2025-06-07T06:32:36.824553180+08:00" level=info msg="Docker daemon" commit=45873be containerd-snapshotter=false storage-d>

Jun 07 06:32:36 rocky05 dockerd[34067]: time="2025-06-07T06:32:36.824718727+08:00" level=info msg="Initializing buildkit"

Jun 07 06:32:36 rocky05 dockerd[34067]: time="2025-06-07T06:32:36.906651330+08:00" level=warning msg="CDI setup error /etc/cdi: failed to monitor for changes: no such >

Jun 07 06:32:36 rocky05 dockerd[34067]: time="2025-06-07T06:32:36.906689604+08:00" level=warning msg="CDI setup error /var/run/cdi: failed to monitor for changes: no s>

Jun 07 06:32:37 rocky05 dockerd[34067]: time="2025-06-07T06:32:37.073381775+08:00" level=info msg="Completed buildkit initialization"

Jun 07 06:32:37 rocky05 dockerd[34067]: time="2025-06-07T06:32:37.086968332+08:00" level=info msg="Daemon has completed initialization"

Jun 07 06:32:37 rocky05 systemd[1]: Started Docker Application Container Engine.

Jun 07 06:32:37 rocky05 dockerd[34067]: time="2025-06-07T06:32:37.087475008+08:00" level=info msg="API listen on /run/docker.sock"

[root@rocky05 ~]#

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

热搜词