Docker镜像报错之一

[root@long~]#docker pull nginx:1.18.0
Error response from daemon: Get https://registry-1.docker.io/v2/library/nginx/manifests/1.18.0: net/http: TLS handshake timeout

Docker镜像源默认是国外的,下载速度慢,最好需要修改国内的
进入/etc/docker ,看看有没有daemon.json文件,此为docker镜像源的配置文件,有则改,无则加

vim /etc/docker/daemon.json

{
"registry-mirrors":["http://hub-mirror.c.163.com"]
}

国内已知的还有
阿里 https://pee6w651.mirror.aliyuncs.com
中国科技大学 https://docker.mirrors.ustc.edu.cn
最后

systemctl daemon-reload 
systemctl restart docker
[root@long ~]#systemctl restart docker
[root@long~]#docker pull nginx:1.18.0
1.18.0: Pulling from library/nginx
54fec2fa59d0: Pull complete 
9c9c769e5838: Pull complete 
90b7f1c33d6d: Pull complete 
144135394326: Pull complete 
Digest: sha256:b1446aa6a4e41e8b0082b1af07fae2051a31c391bfbd667fca9edd613ddc1e8b
Status: Downloaded newer image for nginx:1.18.0
docker.io/library/nginx:1.18.0

成功搞定

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值