欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  科技

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

程序员文章站 2022-07-02 20:50:26
systemctl restart docker在docker-hub拉取慢,因为服务器在外网 直接配置阿里云镜像就可以 首先: vim /etc/docker/daemon.json加入下面的那句 "registry-mirrors": ["https://o88ff1dn.mirror.aliy ......

 

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)

 

 

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

 

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

然后

systemctl daemon-reload

 

 systemctl restart docker

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