Get “https://registry-1.docker.io/v2/“: net/http: request canceled while waiting for connection

目录

1.docker pull 拉取镜像报错如下

2.编辑 resolv.conf 文件

 3.修改daemon.json文件

4.成功解决问题 

5.不针对所有用户可以解决问题(未解决的用户可尝试以下可能会有帮助)

6.通过dig @114.114.114.114 registry-1.docker.io找到IP地址

7.修改hosts解析 

 8.清理构建缓存

9.更改过Docker Engine 

10.阿里后台


1.docker pull 拉取镜像报错如下

2.编辑 resolv.conf 文件

vim /etc/resolv.conf 

 3.修改daemon.json文件

vim  /etc/docker/daemon.json 
{
"max-concurrent-downloads": 10,
"max-concurrent-uploads": 5,
"default-shm-size": "1G",
"debug": true,
"experimental": false,
"registry-mirrors": [
"https://x9r52uz5.mirror.aliyuncs.com",
"https://dockerhub.icu",
"https://docker.chenby.cn",
"https://docker.1panel.live",
"https://docker.awsl9527.cn",
"https://docker.anyhub.us.kg",
"https://dhub.kubesre.xyz",
"https://docker.m.daocloud.io",
"https://dockerproxy.com",
"https://docker.mirrors.ustc.edu.cn",
"https://docker.nju.edu.cn"
]
}
systemctl  daemon-reload
systemctl restart docker

4.成功解决问题 

5.不针对所有用户可以解决问题((未解决的用户可尝试以下可能会有帮助))

以下是我的排查经验最终还是以上方法能解决我的问题

6.通过dig @114.114.114.114 registry-1.docker.io找到IP地址

dig @114.114.114.114 registry-1.docker.io

7.修改hosts解析 

不要纠结我的IP对不对(我排过的问题没解决而已变过了)

 8.清理构建缓存

   docker builder prune

9.更改过Docker Engine 

{
  "debug": true,
  "experimental": false,
  "insecure-registries": [
    "hub.c.163.com",
    "hub-auth.c.163.com",
    "index.docker.io"
  ],
  "registry-mirrors": [
    "https://pee6w651.mirror.aliyuncs.com",
    "http://hub-mirror.c.163.com"
  ]
}

10.阿里后台

https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors

 

评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小杜-

“喜欢我的博客?来杯咖啡吧!”

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值