Docker 获取容器镜像报错

发布时间:2024-03-23
云计算
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
上一个:高速吹瓶机和空压机的关系
下一个:LLD2-2两级跑偏开关

他日我若得好茶 必当一盏酬知音
熔融指数测试仪
定压补水装置的定额制定及分析
dell笔记本重装系统win10(dell笔记本重装系统怎么操作)
压差控制阀通过对系统内的压力进行检测和控制实现对压力差的调节
容留他人吸毒罪量刑的标准是怎样的
SD150D微电脑pH-ORP-EC-TDS-DO-°C多参数测定仪
PFA过滤器:解决水质问题的绿色利器
网络用语ssyy是什么意思,网络用语yy是什么意思
1206W4J0336T5E今日价格,在线查库存