docker拉取镜像时报错,拉取超时
此时想到是不是拉取超时呢,然后配置了一下docker拉取镜像源,没有这个文件就新建一个
vm /etc/docker/daemon.json
{
"registry-mirrors": [
"https://docker.registry.cyou/",
"https://docker-cf.registry.cyou/",
"https://dockercf.jsdelivr.fyi/",
"https://docker.jsdelivr.fyi/",
"https://dockertest.jsdelivr.fyi/",
"https://mirror.aliyuncs.com/",
"https://dockerproxy.com/",
"https://mirror.baidubce.com/",
"https://docker.m.daocloud.io/",
"https://docker.nju.edu.cn/",
"https://docker.mirrors.sjtug.sjtu.edu.cn/",
"https://docker.mirrors.ustc.edu.cn/",
"https://mirror.iscas.ac.cn/",
"https://docker.rainbond.cc/",
"https://jq794zz5.mirror.aliyuncs.com"
]
}
重启docker
# 重新加载配置
systemctl daemon-reload
# 重启docker
systemctl restart docker
# 查看配置是否生效
docker info
还是不行就修改DNS客户机的配置文件
vm /etc/resolv.conf
nameserver 114.114.114.114
nameserver 8.8.8.8