docker下载镜像报net/http: TLS handshake timeout

问题

[root@localhost /]# docker pull centos:latest
Trying to pull repository docker.io/library/centos ... 
latest: Pulling from docker.io/library/centos
d8d02d457314: Pulling fs layer 
error pulling image configuration: Get https://registry-1.docker.io/v2/library/centos/blobs/sha256:67fa590cfc1c207c30b837528373f819f6262c884b7e69118d060a0c04d70ab8: net/http: TLS handshake timeout


这是由于wall的原因,导致从docker.io拉去镜像超时,调整为阿里云的下载中心即可

解决办法

1.修改/etc/sysconfig/docker文件,新增阿里云镜像中心

在docker配置文件/etc/sysconfig/docke的OPTIONS中添加“--registry-mirror=https://fzhifedh.mirror.aliyuncs.com

# Modify these options if you want to change the way the docker daemon runs
OPTIONS='--selinux-enabled --log-driver=journald --signature-verification=false --registry-mirror=https://fzhifedh.mirror.aliyuncs.com '
if [ -z "${DOCKER_CERT_PATH}" ]; then
    DOCKER_CERT_PATH=/etc/docker
fi

2.重启docker服务

systemctl restart docker

 

再次重新拉取镜像就很快了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值