配置阿里云docker镜像地址 - 辉_少

时间:2024-02-19 21:55:03
{
"registry-mirrors": [
"https://kfwkfulq.mirror.aliyuncs.com",
"https://2lqq34jg.mirror.aliyuncs.com",
"https://pee6w651.mirror.aliyuncs.com",
"https://registry.docker-cn.com",
"http://hub-mirror.c.163.com"
],
"dns": ["8.8.8.8","8.8.4.4"]
}

 

安装docker前需要安装的依赖包:

yum install -y yum-utils device-mapper-persistent-data lvm2

使用阿里国内源安装docker

 yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

yum list docker-ce --showduplicates | sort -r

yum makecache fast

yum install docker-ce -y