V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
superdotcom
V2EX  ›  Docker

小白请教 docker 安装后出现的问题

  •  
  •   superdotcom · 3 天前 · 730 次点击

    docker run hello-world Unable to find image 'hello-world:latest' locally docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

    Run 'docker run --help' for more information

    14 条回复    2025-03-29 01:50:48 +08:00
    mumbler
        1
    mumbler  
       3 天前
    docker 已经被墙了,要挂 VPN 才能访问,特别不方便
    linxi7
        2
    linxi7  
       3 天前
    1L 正解,网上找个 docker 源配置下
    superdotcom
        3
    superdotcom  
    OP
       3 天前
    @linxi7 找了半天没找到正确答案,给个我 COPY 一下
    mumbler
        4
    mumbler  
       3 天前
    @superdotcom #3 deepseek 联网搜索,别再用百度了,万事问 AI
    superdotcom
        5
    superdotcom  
    OP
       3 天前
    @mumbler chatgpt:sudo nano /etc/docker/daemon.json
    {
    "registry-mirrors": ["https://mirrors.aliyun.com"]
    }
    好像无效果,结果一样
    popboy126
        6
    popboy126  
       3 天前
    https://status.whgd.eu.org/status/docker 从这里捞一个可用的替换上去
    hwdq0012
        7
    hwdq0012  
       3 天前
    替换完需要
    sudo systemctl daemon-reload
    sudo systemctl restart docker
    moooooooo
        8
    moooooooo  
       3 天前
    找个 woker 代理下
    n2l
        9
    n2l  
       3 天前   ❤️ 1
    都上 v2 了,docker 直接走代理是基操,https://www.lfhacks.com/tech/pull-docker-images-behind-proxy/
    SenLief
        10
    SenLief  
       3 天前 via iPhone
    直接代理
    sgr
        11
    sgr  
       2 天前
    我是不喜欢重新配 daemon.json 再重启的,更何况会有已经在跑的容器,所以我都是直接用别的地址加速下载了以后,再改名回来。就看你怕不怕别人会不会投毒了

    1. 拉取镜像
    docker pull docker.1ms.run/hello-world:latest
    2. 重命名镜像
    docker image tag docker.1ms.run/hello-world:latest hello-world:latest
    3. 删除镜像
    docker rmi docker.1ms.run/hello-world:latest
    snow0
        12
    snow0  
       2 天前
    新版 docker 代理好像有问题,我昨天换回旧版才下下来镜像
    kairlec
        13
    kairlec  
       2 天前
    @sgr 加 "live-restore": true 重启守护程序不会在跑的容器
    kairlec
        14
    kairlec  
       2 天前
    @kairlec 不会影响在跑的容器
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3469 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 20ms · UTC 00:51 · PVG 08:51 · LAX 17:51 · JFK 20:51
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.