# 创建docker配置目录
mkdir /etc/docker

# 创建配置文件
tee /etc/docker/daemon.json <<-'EOF'
{
  "debug": true,
  "storage-driver": "overlay2",
  "storage-opts":["overlay2.override_kernel_check=true"],
  "graph":"/opt/docker",
  "registry-mirrors": [
  "https://hub-mirror.c.163.com",
  "https://docker.mirrors.ustc.edu.cn",
  "https://registry.docker-cn.com"
  ]
}
EOF

# 使用镜像源安装docker
dnf install docker

# 启动docker
systemctl start docker

# 开机自动启动
systemctl enable docker

# 查看docker版本信息
docker info

对CentOS熟悉的朋友,建议使用

EulerOS

,对CentOS有更好的兼容性,支持替换CentOS7/8主流版本。提供2+4+2支持计划。



版权声明:本文为luckcxy原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/luckcxy/article/details/127416593