Docker buil提示https://registry-1.docker.io/v2/: read tcp 10.221->:443: read: connection reset by peer

Docker buil提示https://registry-1.docker.io/v2/: read tcp 10.221->:443: read: connection reset by peerdockerbuild 时提示 Gethttps registry 1 docker io v2 readtcp10 221 20 132 34948 3 229 227 53 443 read connectionre readtcp192 168 104 188 53646 3 216 34 172 443 read connectionre

docker build时提示

Get https://registry-1.docker.io/v2/: read tcp 10.221.20.132:34948->3.229.227.53:443: read: connection reset by peer

方法:

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

; <<>> DiG 9.9.4-RedHat-9.9.4-61.el7 <<>> @114.114.114.114 registry-1.docker.io
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 49148
;; flags: qr rd ra; QUERY: 1, ANSWER: 8, 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.   38      IN      A       107.23.149.57
registry-1.docker.io.   38      IN      A       54.236.165.68
registry-1.docker.io.   38      IN      A       35.169.249.115
registry-1.docker.io.   38      IN      A       34.238.187.50
registry-1.docker.io.   38      IN      A       35.153.88.109
registry-1.docker.io.   38      IN      A       34.197.211.151
registry-1.docker.io.   38      IN      A       54.85.56.253
registry-1.docker.io.   38      IN      A       3.209.182.229

;; Query time: 7 msec
;; SERVER: 114.114.114.114#53(114.114.114.114)
;; WHEN: Thu Jul 15 11:31:54 CST 2021
;; MSG SIZE  rcvd: 177

然后将前两行的ip写入/etc/hosts即可

[root@]# vi /etc/hosts

参照

Docker buil提示https://registry-1.docker.io/v2/: read tcp 10.221->:443: read: connection reset by peer

安装Docker服务,请参照

https://www.runoob.com/docker/centos-docker-install.html

编程小号
上一篇 2025-01-08 17:40
下一篇 2025-01-08 17:30

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/bian-cheng-ji-chu/105331.html