Docker error Error response from daemon when pulling images

docker when pulling redis, throws the following error:

[master@localhost ~]$ docker pull redis
Using default tag: latest
Error response from daemon: Get https://registry-1.docker.io/v2/library/redis/manifests/latest: net/http: TLS handshake timeout

as well as:

[master@localhost ~]$ docker pull redis
Using default tag: latest
Error response from daemon: Get https://registry-1.docker.io/v2/library/redis/manifests/latest: Get https://auth.docker.io/token?scope=repository%3Alibrary%2Fredis%3Apull&service=registry.docker.io: net/http: request canceled (Client.Timeout exceeded while awaiting headers)

Appears to be a network problem, because it is newly installed docker, domestic direct pulling docker hubon a imagesvery slow, it seems there is no reason it should be accelerated due to the configuration, a configuration accelerator, here is the configuration DaoCloud, use the command:

curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://f1361db2.m.daocloud.io

Output is as follows:

[master@localhost ~]$ curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://f1361db2.m.daocloud.io
docker version >= 1.12
{"registry-mirrors": ["http://f1361db2.m.daocloud.io"]}
Success.
You need to restart docker to take effect: sudo systemctl restart docker 

Then use the command sudo systemctl restart dockerto restart the service docker, pull the RedisImage

latest: Pulling from library/redis
fc7181108d40: Downloading [=================================================> ]  22.24MB/22.49MB
3e0ac67cad82: Download complete 
6ee495cb7235: Download complete 
9f7206d08b9d: Download complete 
a8354ef8cccb: Waiting 
53afb10d81c2: Download complete 

Kick call it a day, appears to be network problems, you need to configure accelerator

Guess you like

Origin www.cnblogs.com/linga/p/11037337.html