在拉取镜像的时候报错Client.Timeout exceeded while awaiting headers

原因:延迟较大,网络连接出现问题

 

解决办法:

dotcloud官方页面内也有不同操作系统的教程

 

这里贴出Linux下的解决方案:

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

该脚本可以将 --registry-mirror 加入到你的 Docker 配置文件 /etc/docker/daemon.json 中。适用于 Ubuntu14.04、Debian、CentOS6 、CentOS7、Fedora、Arch Linux、openSUSE Leap 42.1,其他版本可能有细微不同

② 上面的命令会在/etc/docker/daemon.json文件添加上如下配置

③ 加载配置文件、重启docker

$systemctl daemon-reload

$systemctl restart docker 

④ 重新拉取镜像(成功)

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐