docker pull镜像失败问题解决尝试
@[TOC](Error response from daemon: Get “https://registry-1.docker.io/v2/”: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)")
还有下边这两个问题的尝试解决办法
Error response from daemon: Get "https://index.docker.io/v1/search?q=mysql&n=25
1.更改镜像加速地址
vim /etc/docker/daemon.json
{
"registry-mirrors": [
"https://do.nark.eu.org",
"https://dc.j8.work",
"https://docker.m.daocloud.io",
"https://dockerproxy.com",
"https://docker.mirrors.ustc.edu.cn",
"https://docker.nju.edu.cn"
]
}
重启docker
systemctl restart docker
2.添加dns
vim /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
重启docker
systemctl restart docker