问题
[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
再次重新拉取镜像就很快了