云计算 Dokcer 获取容器镜像报错
[root@node1 ~]# docker pull nginx
Using default tag: latest
Trying to pull repository docker.io/library/nginx ...
Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

因为在下载官方镜像点的镜像国内访问速度太慢,所以报错,使用加速器就可以解决这个问题
首先打开配置文件daemon.json,centos上安装后有此文件,但是ubuntu上需要自己创建文件:
[root@node1 ~]# vim /etc/docker/daemon.json
在文件中加入:
{
"registry-mirrors":["https://docker.mirrors.ustc.edu.cn"]
}
然后重启守护进程:
[root@node1 ~]# systemctl daemon-reload
[root@node1 ~]#systemctl restart docker
可以使用阿里的加速器:https://yq.aliyun.com/articles/29941

售后响应及时
7×24小时客服热线
数据备份
更安全、更高效、更稳定
价格公道精准
项目经理精准报价不弄虚作假
合作无风险
重合同讲信誉,无效全额退款