云计算
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
阿里云租服务器费用阿里云服务器怎么关闭里面的软件服务企业邮箱企业网盘怎么发送腾讯云服务器怎么安装软件超级vps管理器国内大带宽云服务器便宜如何进行com注册?域名后缀的种类有哪些?按照昨天沟通已经在原来注册商将需改为西数的交易 供应链服务 钢铁发展新格局