1、安装docker
yum install -y yum-utils
#官方源
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
#阿里云加速源
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum install docker-ce docker-ce-cli containerd.io2、配置docker网段和加速源
/etc/docker/daemon.json
{
"bip": "192.168.120.1/24",
"registry-mirrors": [
"https://docker.1ms.run"
]
}3、启动服务
systemctl enable --now docker4、镜像源推荐
毫秒镜像
https://1ms.run/
Docker CE 软件仓库 清华大学
https://mirrors.tuna.tsinghua.edu.cn/help/docker-ce/
评论