docker pull 出现错误:Error response from daemon

[root@CentOSlocalhost /]# docker pull mysql
Using default tag: latest
Error response from daemon: Get " https://registry-1.docker.io/v2/library/mysql/manifests/sha256:ca114710bb35b862062fd51733a7dba1ba3e93be33e4eede442b0ce15c77b718": read tcp 192.168.32.101:53806->18.215.138.58:443: read: connection reset by peer

解决方法:

解析ip不可用,可以使用 dig @114.114.114.114 registry-1.docker.io找到 如下信息

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

IP地址非固定可能会变动,所以需要多试几次(几个IP)

[root@CentOSlocalhost /]# dig @114.114.114.114 registry-1.docker.io

; <<>> DiG 9.11.4-P2-RedHat-9.11.4-26.P2.el7 <<>> @114.114.114.114 registry-1.docker.io
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59767
;; 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.INA

;; ANSWER SECTION:
registry-1.docker.io.121INA34.194.164.123
registry-1.docker.io.121INA52.1.184.176
registry-1.docker.io.121INA18.215.138.58

;; Query time: 27 msec
;; SERVER: 114.114.114.114#53(114.114.114.114)
;; WHEN: 六 3月 25 20:58:06 CST 2023
;; MSG SIZE rcvd: 97

修改/etc/hosts强制docker.io相关的域名解析到其它可用IP

保存配置文件后进行多次重试可以成功下载镜像

docker pull 出现错误:Error response from daemon_第1张图片

你可能感兴趣的:(Java,java,spring,spring,boot)