当前位置:   article > 正文

运维系列(亲测有效):Docker pull拉取镜像报错“Error response from daemon: Get “https://registry-1.docker.io/v2”解决办法_docker pull error response

docker pull error response

Docker pull拉取镜像报错“Error response from daemon: Get “https://registry-1.docker.io/v2”解决办法




一、报错信息

[root@node ~]# docker pull o2oa/o2server
Using default tag: latest
Error response from daemon: Head "https://registry-1.docker.io/v2/o2oa/o2server/manifests/latest": net/http: TLS handshake timeout
  • 1
  • 2
  • 3

二、检查daemon.json 文件

1.编辑daemon.json

可额外添加网易163的镜像加速

[root@node ~]# cat /etc/docker/daemon.json
{"registry-mirrors": ["https://registry.docker-cn.com","http://hub-mirror.c.163.com"]}
  • 1
  • 2

2.重启服务

systemctl daemon-reload
  • 1
systemctl restart docker
  • 1

三、查看dns解析

[root@node ~]# dig @114.114.114.114 registry-1.docker.io

; <<>> DiG 9.9.4-RedHat-9.9.4-72.el7 <<>> @114.114.114.114 registry-1.docker.io
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37194
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;registry-1.docker.io.		IN	A

;; ANSWER SECTION:
registry-1.docker.io.	32	IN	A	44.194.5.25
registry-1.docker.io.	32	IN	A	44.207.96.114
registry-1.docker.io.	32	IN	A	44.207.51.64

;; Query time: 31 msec
;; SERVER: 114.114.114.114#53(114.114.114.114)
;; WHEN: Sat Aug 13 23:16:55 CST 2022
;; MSG SIZE  rcvd: 97
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23

四、添加host解析

[root@node ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
44.194.5.25  registry-1.docker.io
  • 1
  • 2
  • 3
  • 4

五、重新拉取镜像

[root@node ~]# docker pull o2oa/o2server
Using default tag: latest
latest: Pulling from o2oa/o2server
125a6e411906: Pull complete 
afe724e20696: Pull complete 
fde7ffb259f7: Pull complete 
5aec3a1a0b3a: Pull complete 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7







江湖有缘

Docker pull拉取镜像报错“Error response from daemon: Get “https://registry-1.docker.io/v2”解决办法

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/604796
推荐阅读
相关标签
  

闽ICP备14008679号