小白请教 docker 安装后出现的问题 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
superdotcom
V2EX    Docker

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

  •  
  •   superdotcom 199 天前 1834 次点击
    这是一个创建于 199 天前的主题,其中的信息可能已经有所发展或是发生改变。

    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

    15 条回复    2025-04-26 18:12:25 +08:00
    mumbler
        1
    mumbler  
       199 天前
    docker 已经被墙了,要挂 VPN 才能访问,特别不方便
    linxi7
        2
    linxi7  
       199 天前
    1L 正解,网上找个 docker 源配置下
    superdotcom
        3
    superdotcom  
    OP
       199 天前
    @linxi7 找了半天没找到正确答案,给个我 COPY 一下
    mumbler
        4
    mumbler  
       199 天前
    @superdotcom #3 deepseek 联网搜索,别再用百度了,万事问 AI
    superdotcom
        5
    superdotcom  
    OP
       199 天前
    @mumbler chatgpt:sudo nano /etc/docker/daemon.json
    {
    "registry-mirrors": ["https://mirrors.aliyun.com"]
    }
    好像无效果,结果一样
    popboy126
        6
    popboy126  
       199 天前
    https://status.whgd.eu.org/status/docker 从这里捞一个可用的替换上去
    hwdq0012
        7
    hwdq0012  
       199 天前
    替换完需要
    sudo systemctl daemon-reload
    sudo systemctl restart docker
    moooooooo
        8
    moooooooo  
       199 天前
    找个 woker 代理下
    n2l
        9
    n2l  
       199 天前   1
    都上 v2 了,docker 直接走代理是基操,https://www.lfhacks.com/tech/pull-docker-images-behind-proxy/
    SenLief
        10
    SenLief  
       198 天前 via iPhone
    直接代理
    sgr
        11
    sgr  
       198 天前
    我是不喜欢重新配 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  
       198 天前
    新版 docker 代理好像有问题,我昨天换回旧版才下下来镜像
    kairlec
        13
    kairlec  
       197 天前
    @sgr 加 "live-restore": true 重启守护程序不会在跑的容器
    kairlec
        14
    kairlec  
       197 天前
    @kairlec 不会影响在跑的容器
    scoful
        15
    scoful  
       169 天前
    - docker 的话,推荐一下我的开源项目(狗头保护,求 star ) https://github.com/scoful/pocker
    - 试用地址: https://pocker4u.vercel.app/
    - 试用密钥:pocker4u
    - 文档: https://pocker-doc.vercel.app/
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     1481 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 20ms UTC 16:25 PVG 00:25 LAX 09:25 JFK 12:25
    Do have faith in what you're doing.
    ubao snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86