# yum install -y yum-utils device-mapper-persistent-data lvm2
# yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
# yum install -y docker-ce docker-ce-cli containerd.io
# systemctl start docker
# systemctl enable docker
# docker run hello-world
# cat /etc/docker/daemon.json
{
"registry-mirrors": ["http://271d509e.m.daocloud.io"],
"insecure-registries": ["quay.io","daocloud.io","aliyuncs.com"],
"dns": ["172.23.63.225"],
"bip": "192.168.2.1/24",
"fixed-cidr": "192.168.2.0/25"
}
# systemctl restart docker
# docker run hello-world
docker安装(简单run hello-world)
最新推荐文章于 2025-11-13 14:09:16 发布
本文详细介绍了如何在CentOS系统上安装Docker,并配置Docker的镜像加速器,包括添加仓库、安装Docker及组件、启动与设置开机自启、运行测试容器、配置Docker守护进程及重启服务等步骤。

722

被折叠的 条评论
为什么被折叠?



