docker拉取慢(net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting head)

 

systemctl restart docker在docker-hub拉取慢,因为服务器在外网

直接配置阿里云镜像就可以

首先:

vim /etc/docker/daemon.json
加入下面的那句


 

 

 docker拉取慢(net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting head)_第1张图片

 

"registry-mirrors": ["https://o88ff1dn.mirror.aliyuncs.com"]

然后

systemctl daemon-reload

 

 systemctl restart docker

就ok,注意,etc/docker/daemon.json里本来就有俩括号,直接在阔括号里面加我标红的那句就可以了,千万千万别加俩大括号,切记!!!(我一直加,弄了俩小时,一直拉不了,一不加,瞬间拉下来了,坑啊!!!!!)

你可能感兴趣的:(docker拉取慢(net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting head))