不知道哪里来的,但是可以用。

1. 解决方案

  1. 打开配置文件(若文件不存在,会自动创建)
    sudo vim /etc/docker/daemon.json

  2. 将以下内容粘贴进去

{
    "builder": {
      "gc": {
        "defaultKeepStorage": "20GB",
        "enabled": true
      }
    },
    "experimental": true,
    "features": {
      "buildkit": true
    },
    "insecure-registries": [
      "172.24.86.231"
    ],
    "registry-mirrors": [
      "https://dockerproxy.com",
      "https://mirror.baidubce.com",
      "https://ccr.ccs.tencentyun.com",
      "https://docker.m.daocloud.io",
      "https://docker.nju.edu.cn",
      "https://docker.mirrors.ustc.edu.cn"
    ],
    "log-driver":"json-file",
    "log-opts": {
      "max-size":"500m", 
      "max-file":"3"
    }
  }
  1. 重启docker服务使配置生效
# 2. 重启 Docker 服务
sudo systemctl restart docker

# 3. 验证配置是否成功(输出中会显示 "Registry Mirrors" 列表)
docker info
  1. 拉取某个镜像
    docker pull rayproject/ray-ml:2.46.0.0e19ea-py39-cpu
Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐