docker报错——docker_Error response from daemon_Get "https://registry-1.docker.io/v2/"

相关:
https://www.cnblogs.com/liujunjun/p/18546650



从docker的hub库中拉取镜像时报错,具体如下:

docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
See 'docker run --help'.


https://www.cnblogs.com/liujunjun/p/18546650中找到解决方法,经过测试成功解决问题,具体步骤如下:


修改配置文件 /etc/docker/daemon.json,修改后内容如下:

{
    "runtimes": {
        "nvidia": {
            "args": [],
            "path": "nvidia-container-runtime"
        }
    },


    "registry-mirrors": ["https://docker.registry.cyou",
    "https://docker-cf.registry.cyou",
    "https://dockercf.jsdelivr.fyi",
    "https://docker.jsdelivr.fyi",
    "https://dockertest.jsdelivr.fyi",
    "https://mirror.aliyuncs.com",
    "https://dockerproxy.com",
    "https://mirror.baidubce.com",
    "https://docker.m.daocloud.io",
    "https://docker.nju.edu.cn",
    "https://docker.mirrors.sjtug.sjtu.edu.cn",
    "https://docker.mirrors.ustc.edu.cn",
    "https://mirror.iscas.ac.cn",
    "https://docker.rainbond.cc"]


}

修改后配置文件,重启docker服务,命令如下:

systemctl daemon-reload

systemctl restart docker


个人github博客地址:
https://devilmaycry812839668.github.io/

posted on 2024-11-25 16:13  Angry_Panda  阅读(1267)  评论(0编辑  收藏  举报

导航