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

Docker 网络问题, 求大神看一眼

  •  
  •   seandor · 2020-01-12 20:34:45 +08:00 · 4578 次点击
    这是一个创建于 1537 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我用的 docker for windows,配置了国内的镜像加速,之前用的好好的,现在却没法 pull 镜像。

    docker info
    
     Registry Mirrors:
      https://docker.mirrors.ustc.edu.cn/
     Live Restore Enabled: false
     Product License: Community Engine
    
    

    运行

    $ docker pull hello-world
    Using default tag: latest
    Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 192.168.65.1:53: read udp 192.168.65.3:58769->192.168.65.1:53: i/o timeout
    
    

    这个命令每次报的错还不太一样,但都是跟https://registry-1.docker.io/v2/这个地址 ping 不通有关。

    这跟我用的网络提供商是移动有关吗?

    是不是不管配置不配置国内镜像加速,都会走那个地址去验证些东西?我试过手动指定下载地址,但是卡在验证文件完整性上。

    $ docker pull docker.mirrors.ustc.edu.cn/library/kong:0.13
    0.13: Pulling from library/kong
    5a3ea8efae5d: Pulling fs layer
    94ba7d7143a3: Pulling fs layer
    da453abf4e53: Pulling fs layer
    da453abf4e53: Verifying Checksum
    da453abf4e53: Download complete
    94ba7d7143a3: Download complete
    5a3ea8efae5d: Retrying in 5 seconds
    5a3ea8efae5d: Retrying in 4 seconds
    5a3ea8efae5d: Retrying in 3 seconds
    5a3ea8efae5d: Retrying in 2 seconds
    5a3ea8efae5d: Retrying in 1 second
    5a3ea8efae5d: Retrying in 10 seconds
    5a3ea8efae5d: Retrying in 9 seconds
    5a3ea8efae5d: Retrying in 8 seconds
    5a3ea8efae5d: Retrying in 7 seconds
    5a3ea8efae5d: Retrying in 6 seconds
    5a3ea8efae5d: Retrying in 5 seconds
    5a3ea8efae5d: Retrying in 4 seconds
    
    seandor
        1
    seandor  
    OP
       2020-01-12 20:35:30 +08:00
    很绝望。
    chinesestudio
        2
    chinesestudio  
       2020-01-12 21:08:28 +08:00 via Android
    挂个代理很难么
    waterjiao
        3
    waterjiao  
       2020-01-12 21:15:10 +08:00
    配一个阿里的地址试试
    seandor
        4
    seandor  
    OP
       2020-01-12 21:29:49 +08:00
    @waterjiao 这跟配镜像地址没有关系吧,阿里的那个我一开始就没成功过。你的网络能 ping 通 registry-1.docker.io 这个地址吗
    seandor
        5
    seandor  
    OP
       2020-01-12 21:30:13 +08:00
    @chinesestudio 挂代理也 ping 不通,浏览器倒是没问题
    cloverzrg2
        6
    cloverzrg2  
       2020-01-12 22:06:04 +08:00
    登录阿里云,访问这个地址 https://cr.console.aliyun.com/cn-beijing/instances/mirrors 获取你的加速器地址
    seandor
        7
    seandor  
    OP
       2020-01-12 22:07:46 +08:00
    换了个源就好了,真是无语,整半天了。之前的源配上去就感觉不起作用,还是走原来的地址。
    francis59
        8
    francis59  
       2020-01-12 22:10:56 +08:00   ❤️ 1
    192.168.65.1:53 ?怎么是内网地址? 53 端口不是 DNS 服务端口吗?是不是 DNS 解析有问题? nslookup registry-1.docker.io 试试
    artvista
        9
    artvista  
       2020-01-12 22:13:44 +08:00   ❤️ 1
    镜像挂了吧,试试这个: https://silenceshell.github.io/docker_mirror/
    seandor
        10
    seandor  
    OP
       2020-01-12 22:19:51 +08:00
    @francis59 换镜像源就解决了,完全没搞懂为什么镜像源还可以挂掉,之前用的都好好的。之前用的是 http://f1361db2.m.daocloud.io 。我换了中科院的也不行,我还以为必须走那个地址。其实根本不是,就是镜像源有问题。
    seandor
        11
    seandor  
    OP
       2020-01-12 22:20:22 +08:00
    @artvista 保存了,说不准哪天镜像源又挂了。
    suant0u
        12
    suant0u  
       2020-01-12 22:25:56 +08:00
    表示一直在用 Aliyun 的. 挺好用的. 而且还很快.
    yujincheng08
        13
    yujincheng08  
       2020-01-12 22:43:06 +08:00
    之前用中科大的反代,速度不是很理想;用 aliyun 之后感觉速度非常满意
    cityboy
        14
    cityboy  
       2020-01-13 09:48:39 +08:00
    感觉跟 dns 有关,你可以试试加上 8.8.8.8 在看看,以前我遇到类似的问题,但是报错记不清了。
    efaun
        15
    efaun  
       2020-01-13 11:11:15 +08:00
    所有镜像只用阿里云,品质保证
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1277 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 23:27 · PVG 07:27 · LAX 16:27 · JFK 19:27
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.