【docker问题】Client.Timeout exceeded while awaiting headers

时间:2020-05-27 00:25:45   收藏:0   阅读:1156

在进行docker pull 拉取镜像时,出现过下面的错误:

net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

原因是国内下载官方镜像点提供的镜像时,速度缓慢,超时。使用加速器就可以解决这个问题。
笔者使用的是Centos7,首先需要创建配置文件daemon.json

vim /etc/docker/daemon.json

在文件中写入:

{
“registry-mirrors”:[“https://docker.mirrors.ustc.edu.cn”]
}

然后重启进程:

systemctl daemon-reload
systemctl restart docker

重新拉取镜像,问题解决!

原文:https://www.cnblogs.com/ycz109/p/12969554.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!