惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
博客园 - Franky
GbyAI
GbyAI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
爱范儿
爱范儿
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
博客园_首页
MongoDB | Blog
MongoDB | Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recent Announcements
Recent Announcements
Scott Helme
Scott Helme
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
C
CERT Recently Published Vulnerability Notes
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Jina AI
Jina AI
F
Fortinet All Blogs
N
Netflix TechBlog - Medium
L
LangChain Blog
L
LINUX DO - 最新话题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Hacker News: Front Page
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
AI
AI
T
Troy Hunt's Blog
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
S
Secure Thoughts
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
S
Security @ Cisco Blogs
Cloudbric
Cloudbric
E
Exploit-DB.com RSS Feed
Attack and Defense Labs
Attack and Defense Labs

博客园 - 挥辉

评估vosk模型的词错率,响应时间和吞吐量 在 macOS 中遇到 brew 命令不存在的问题 comfyui on Mac M4 【转】向量数据库与Milvus Mac下使用Windows键盘的主要按键对应设置 [转]Install MySQL CentOS MacOS安装软件及运行时,提示“已损坏无法打开”的解决方案 MAXKey SSO Docker Compose部署 【AI落地验证-1】Dify本地搭建 【转载】APM——SkyWalking 是什么 [转载]9个顶级开发IoT项目的开源物联网平台 转——visual studio快捷键大全 等保测评:你们要的漏扫工具来了(附工具下载链接) 转-计算文件哈希值 转-python安装openCV介绍 转-python依赖包整体迁移方法 转-Mongodb亿级数据量的性能测试 转-MongoDB的真正性能-实战百万用户 转-Python操作MongoDB看这一篇就够了
【AI落地验证-1】CentOS Docker 安装
挥辉 · 2025-08-19 · via 博客园 - 挥辉

CentOS Docker 安装

Docker 支持以下的 64 位 CentOS 版本:

  • CentOS 9 (stream)
  • 更高版本...

必须启用 centos-extras 仓库,该仓库默认启用,如果您禁用了它,需要重新启用。


使用官方安装脚本自动安装

安装命令如下:

$ curl -fsSL https://get.docker.com -o install-docker.sh
$ sudo sh install-docker.sh

手动安装

卸载旧版本

较旧的 Docker 版本称为 docker 或 docker-engine,如果已安装这些程序,请卸载它们以及相关的依赖项。

运行以下命令卸载旧版本:

sudo dnf remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine

安装

使用 Docker 仓库进行安装

在新主机上首次安装 Docker 之前,需要设置 Docker 仓库。之后,您可以从仓库安装和更新 Docker。

设置仓库

安装 dnf-plugins-core 包(提供管理 DNF 仓库的命令),并设置仓库。

sudo dnf -y install dnf-plugins-core

使用以下命令来设置稳定的仓库。

使用官方源地址(比较慢)

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

可以执行以下命令换成清华大学的镜像源:

清华大学镜像源

sed -i 's+https://download.docker.com+https://mirrors.tuna.tsinghua.edu.cn/docker-ce+' /etc/yum.repos.d/docker-ce.repo

参考地址:https://mirrors.tuna.tsinghua.edu.cn/help/docker-ce/

安装

运行以下命令安装Docker::

sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

如果提示接受 GPG 密钥,验证指纹是否与 060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35 匹配,如果匹配则接受。

安装成功后,启动 Docker 引擎:

sudo systemctl start docker

如果希望 Docker 在系统启动时也启动可以使用以下命令:

sudo systemctl enable --now docker

以上命令会配置 Docker 的 systemd 服务,在系统启动时自动启动 Docker。

Docker 安装完默认未启动。并且已经创建好 docker 用户组,但该用户组下没有用户。

运行以下命令来验证安装是否成功:

sudo docker run hello-world

此命令会下载一个测试镜像,并在容器中运行,当容器运行时,会打印确认消息并退出。

卸载 docker

删除安装包:

yum remove docker-ce

删除镜像、容器、配置文件等内容:

rm -rf /var/lib/docker

---安装日志

Metadata Cache Created
+ sh -c 'yum -y -q install docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin docker-model-plugin'
warning: /var/cache/yum/docker-ce-stable/packages/docker-buildx-plugin-0.14.1-1.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
Public key for docker-buildx-plugin-0.14.1-1.el7.x86_64.rpm is not installed

Importing GPG key 0x621E9F35:
Userid : "Docker Release (CE rpm) <docker@docker.com>"
Fingerprint: 060a 61c5 1b55 8a7f 742b 77aa c52f eb6b 621e 9f35
From : https://download.docker.com/linux/centos/gpg
setsebool: SELinux is disabled.

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

To run Docker as a non-privileged user, consider setting up the
Docker daemon in rootless mode for your user:

dockerd-rootless-setuptool.sh install

Visit https://docs.docker.com/go/rootless/ to learn about rootless mode.


To run the Docker daemon as a fully privileged service, but granting non-root
users access, refer to https://docs.docker.com/go/daemon-access/

WARNING: Access to the remote API on a privileged Docker daemon is equivalent
to root access on the host. Refer to the 'Docker daemon attack surface'
documentation for details: https://docs.docker.com/go/attack-surface/