CentOS 7 下 Docker Pull TLS handshake timeout 错误

Docker 安装方式

拉取 yum 源
[root@node1 ~]# curl http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo -o /etc/yum.repos.d/docker.repo
yum 安装
[root@node1 ~]# yum -y install docker-ce-3:19.03.9-3.el7.x86_64

错误

[root@node1 yum.repos.d]# docker pull postgres:latest
Error response from daemon: Get https://registry-1.docker.io/v2/library/postgres/manifests/latest: Get https://auth.docker.io/token?scope=repository%3Alibrary%2Fpostgres%3Apull&service=registry.docker.io: net/http: TLS handshake timeout

解决办法

添加配置文件
[root@node1 ~]# cat /etc/docker/daemon.json 
{
 "registry-mirrors":["https://6kx4zyno.mirror.aliyuncs.com"]
}
重启 docker
[root@node1 ~]# systemctl restart docker

再次拉取

[root@node1 yum.repos.d]# docker pull postgres:latest
latest: Pulling from library/postgres
a076a628af6f: Pull complete 
d54fa0e0eb76: Pull complete 
8950a7ea6876: Pull complete 
1cc02b1df09e: Pull complete 
06f548e51228: Pull complete 
74665692d4ea: Pull complete 
235e34eb13ab: Pull complete 
4ad7ef5e2e79: Pull complete 
76670339b0f8: Pull complete 
496fa0539f99: Pull complete 
f32ecbdf3b52: Pull complete 
7536b8fe81ac: Pull complete 
71dfc17927aa: Pull complete 
fd48bac409bb: Pull complete 
Digest: sha256:ec74afc9fa969a235462c27017a3fe73a05c9d4725d7e4afbe2ba6eb82fdfc87
Status: Downloaded newer image for postgres:latest

参考

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值