docker拉取镜像报错
docker拉取镜像报错:error pulling : download failed after attempts=6: dial tcp 69.162.134.178:443: i/o time
1、vim /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 1.1.1.1
2、vim /etc/docker/daemon.json
{
"dns": [
"8.8.8.8",
"8.8.4.4",
"1.1.1.1"
],
"registry-mirrors": [
"https://docker.m.daocloud.io",
"https://dockerproxy.com",
"https://docker.mirrors.ustc.edu.cn",
"https://docker.nju.edu.cn",
"https://registry.docker-cn.com",
"https://docker.mirrors.ustc.edu.cn",
"https://hub-mirror.c.163.com",
"https://mirror.baidubce.com"
]
}
3、重启
sudo systemctl daemon-reload && sudo systemctl restart docker
或者
sudo service docker restart
参考:https://blog.csdn.net/m0_47460678/article/details/140396410