Ubuntu18.04LTS日志8-拉docker镜像遇到的小问题
(1)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)
解决方法:
这个时候是因为镜像从国外拉取,此处修改拉取地址
sudo vim /etc/docker/daemon.json
添加:阿里云镜像
{
“registry-mirrors”:[“https://6kx4zyno.mirror.aliyuncs.com”]
}
中科院镜像
{
“registry-mirrors”:[“https://docker.mirrors.ustc.edu.cn”]
}
(2)Error response from daemon: Get https://registry-1.docker.io/v2/spellrun/pytorch/manifests/latest: Get https://auth.docker.io/token?scope=repository%3Aspellrun%2Fpytorch%3Apull&service=registry.docker.io: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
解决方法:
step1:先输入 dig @114.114.114.114 registry-1.docker.iostep2:这里看到registry-1.docker.io. 53 IN A 52.87.94.70
step3:新建一个窗口,sudo vim /etc/hosts
step4:添加地址
step5:保存退出,重启docker就可以愉快的下载了。