docker pull 下载镜像,出现这些错误

error pulling image configuration:XXX net/http: TLS handshake timeout_容器


主要是因为docker镜像的在国外无法下载的问题。

可以修改为阿里云的加速镜像

error pulling image configuration:XXX net/http: TLS handshake timeout_json_02

配置的命令:

sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://XXXXX.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker

再次下载就可以成功

error pulling image configuration:XXX net/http: TLS handshake timeout_运维_03