Docker Hub仓库下载镜像网络异常问题的解决

通过docker pull 从公共仓库Docker Hub下载镜像失败

[root@node-11 ~]# docker pull Ubuntu:14.04
Trying to pull repository docker.io/library/ubuntu ...
14.04: Pulling from docker.io/library/ubuntu
c2c80a08aa8c: Pulling fs layer
6ace04d7a4a2: Download complete
f03114bcfb25: Pulling fs layer
99df43987812: Waiting
9c646cd4d155: Waiting
error pulling image configuration: Get https://dseasb33srnrn.cloudfront.net/registry-v2/docker/registry/v2/blobs/sha256/3b/3b853789146f1f249f204a7f29573263ef3486571acb72d7fd8f13056450b807/data?Expires=1524231928&Signature=dVzrl5Nb36kFpSt4jdf6tv5pC87UcHO36sK9vTpWde2rPCVtCEu9pCJlP2iD~xYw50ze5eua0nooo62~f2F6AyfnoYFmLid5sV4H3c0PS2csSFWD7pvvzxEh0Mma8d-kHbWqm7Xa6GCcRM5tgaXXClIZB56HYSa11rZgaofqz6A_&Key-Pair-Id=APKAJECH5M7VWIS5YZ6Q: net/http: TLS handshake timeout

因为本人办公区网络不能再吐槽,导致无法去Docker Hub仓库下载镜像。可以通过配置国内 daocloud镜像源解决这个问题。

编辑/etc/sysconfig/docker配置文件,在OPTIONS='--selinux-enabled --log-driver=journald --signature-verification=false 后面添加国内的docker镜像源--registry-mirror=http://f2d6cd40.m.daocloud.io

Docker Hub仓库下载镜像网络异常问题的解决

添加后重启docker 服务,即可解决网络影响下载问题

[root@node-11 ~]# systemctl restart docker
[root@node-11 ~]# docker pull ubuntu:14.04
Trying to pull repository docker.io/library/ubuntu ...
14.04: Pulling from docker.io/library/ubuntu
c2c80a08aa8c: Pull complete
6ace04d7a4a2: Pull complete
f03114bcfb25: Pull complete
99df43987812: Pull complete
9c646cd4d155: Pull complete
Digest: sha256:ecc95bdd86160924520fdfafebfbff676cbe278d985fec0797f27d141fcde56b
Status: Downloaded newer image for docker.io/ubuntu:14.04

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/bcd2353d7d602ea76f3d66da7ac07e9d.html