docker报错无法连接registry-1.docker.io,pull镜像失败的解决方案
作者:北京秃子运维
这篇文章主要介绍了docker报错无法连接registry-1.docker.io,pull镜像失败的解决方案,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教
一、执行docker pull命令
拉取镜像失败:
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)

二、解决方案
解决的步骤如下:
1、打开daemon.json文件
sudo nano /etc/docker/daemon.json
2、将其镜像地址进行替换
```bash
{
"registry-mirrors": [
"https://docker.m.daocloud.io",
"https://dockerproxy.com",
"https://registry.docker-cn.com",
"https://docker.mirrors.ustc.edu.cn",
"https://hub-mirror.c.163.com",
"https://hub.uuuadc.top",
"https://docker.anyhub.us.kg",
"https://dockerhub.jobcher.com",
"https://dockerhub.icu",
"https://docker.ckyl.me",
"https://docker.awsl9527.cn",
"https://mirror.baidubce.com"
]
}
三、重启docker服务
systemctl daemon-reload systemctl restart docker
总结
以上为个人经验,希望能给大家一个参考,也希望大家多多支持脚本之家。
您可能感兴趣的文章:
- 解决docker pull报错Get"https://registry-1.docker.io/v2/": net/http: request canceled while waiting for c的问题
- Docker pull时报错:https://registry-1.docker.io/v2/完美解决办法
- docker配置镜像Docker pull时报错:https://registry-1.docker.io/v2/问题
- Docker pull报错:https://registry-1.docker.io/v2/的解决方法
- 解决Docker pull拉取镜像报错“Error response from daemon:Get“https://registry-1.docker.io/v2”问题
- docker拉取镜像报错:Error response from daemon: Get “https://registry-1.docker.io/v2/“: dial tcp的解决方案
- docker Get https://registry-1.docker.io/v2/: net/http: request canceled 报错
- 解决Docker镜像拉取超时及优化网络配置的方法(failed to do request: Head “https://registry-1.docker.io/v2/*)
