Bootstrap

docker拉取错误解决

error pulling image configuration: download failed after attempts=6: dial tc

首先,打开 Docker 的配置文件 daemon.json。

sudo nano /etc/docker/daemon.json
1
步骤二:添加国内镜像源
在配置文件中添加以下内容:

{"registry-mirrors": 
["https://registry.docker-cn.com",
"https://docker.mirrors.ustc.edu.cn",
"https://hub-mirror.c.163.com",
"https://hub.uuuadc.top",
"https://docker.anyhub.us.kg",
"https://dockerhub.jobcher.com",
"https://dockerhub.icu",
"https://docker.ckyl.me",
"https://docker.aws19527.cn",
"https://mirror.baidubce.com"
]

  
 
“将 Docker 镜像源换成国内的镜像源,提高镜像拉取的成功率”

步骤三:重启 Docker 服务
保存配置文件并重启 Docker 服务:

sudo systemctl daemon-reload
sudo systemctl restart docker
 

# 打开 Docker 配置文件
sudo nano /etc/docker/daemon.json

# 添加国内镜像源
{
  "registry-mirrors": [
    "https://registry.docker-cn.com",
    "https://docker.mirrors.ustc.edu.cn",
    "https://hub-mirror.c.163.com",
    "https://mirror.baidubce.com"
  ]
}

# 重启 Docker 服务
sudo systemctl daemon-reload
sudo systemctl restart docker
 

;