error pulling image configuration: download failed after attempts=6: dial tcp 47.88.58.234:443: conn

时间:2024-11-12 07:54:59

docker拉取镜像超时

    • ✅问题描述
    • ✅解决

✅问题描述

记录一个bug,最近重装下腾讯云服务器后,发现docker拉去镜像超时拉去不下来,报错如下:

error pulling image configuration: download failed after attempts=6: dial tcp 47.88.58.234:443: connect: connection refused

image-20240626223357380

✅解决

设置国内镜像

1.创建/etc/docker目录

sudo mkdir -p /etc/docker

2.创建docker镜像配置文件

sudo tee /etc/docker/ <<-'EOF'
 
 {
  "registry-mirrors": [
          "",
          "",
          ".",
          ""
  ]
}
 
EOF

3.重启

sudo systemctl daemon-reload
sudo systemctl restart docker

或者

sudo service docker restart