编辑daemon.json文件(没有该文件则新建):vim /etc/docker/daemon.json
插入以下国内镜像地址:
{
"registry-mirrors": [
"https://9cpn8tt6.mirror.aliyuncs.com",
"https://8bhew391.mirror.aliyuncs.com",
"https://almtd3fa.mirror.aliyuncs.com",
"https://hccwwfjl.mirror.aliyuncs.com",
"https://registry.docker-cn.com",
"http://hub-mirror.c.163.com"
]
}
重启Docker服务:
systemctl daemon-reload
systemctl restart docker