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

ustc 的镜像按照说明配了,还是很慢怎么办?

  •  
  •   phx13ye ·
    Alwayswithme · 2017-05-04 23:04:56 +08:00 · 4058 次点击
    这是一个创建于 2520 天前的主题,其中的信息可能已经有所发展或是发生改变。

    按照文档 https://lug.ustc.edu.cn/wiki/mirrors/help/docker

    新版的 Docker 使用 /etc/docker/daemon.json 加入以下内容即可配置 mirror

    {
      "registry-mirrors": ["https://docker.mirrors.ustc.edu.cn"]
    }
    

    但是 pull 个 redis 都会卡住

    楼主现在只能配置 proxy 使用,方法是在 /etc/systemd/system/docker.service.d/override.conf 中加入 [Service] Environment="HTTPS_PROXY=https://proxy.example.com:443/"

    对这种方法也不是很满意,不想用的时候还要把这个文件或把内容注释移走并重启服务,有没有临时让 docker daemon 挂代理的方法

    6 条回复    2017-05-04 23:35:25 +08:00
    zeyexe
        1
    zeyexe  
       2017-05-04 23:12:32 +08:00
    docker info 看下 Registry Mirrors 信息是不这样:

    Registry Mirrors:
    https://docker.mirrors.ustc.edu.cn


    如果已经配置上了还慢那就是确实你那里到 USTC 慢了
    phx13ye
        2
    phx13ye  
    OP
       2017-05-04 23:19:33 +08:00
    @zeyexe 是啊
    Insecure Registries:
    127.0.0.0/8
    Registry Mirrors:
    https://docker.mirrors.ustc.edu.cn/
    Live Restore Enabled: false
    但是ustc在我的源里面能排进前六的啊,不过是arch的源
    ```
    ~ rankmirrors -n 6 /etc/pacman.d/mirrorlist.pacnew | grep -v "^#"
    Server = http://mirrors.zju.edu.cn/archlinux/$repo/os/$arch
    Server = http://mirrors.neusoft.edu.cn/archlinux/$repo/os/$arch
    Server = http://mirrors.ustc.edu.cn/archlinux/$repo/os/$arch
    Server = http://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch
    Server = https://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch
    Server = https://mirrors.ustc.edu.cn/archlinux/$repo/os/$arch
    ```
    billlee
        3
    billlee  
       2017-05-04 23:26:06 +08:00
    ustc 又出 bug 了吧,前几个月就出过问题,当时给管理员发了 email, 好了一段时间又出问题了,我已经换到网易的 mirror 了。
    phx13ye
        4
    phx13ye  
    OP
       2017-05-04 23:27:32 +08:00
    @billlee 要不要注册 id 什么的,网易的是不是要加他们的前缀?
    类似
    163.com/library/redis?
    billlee
        5
    billlee  
       2017-05-04 23:30:31 +08:00
    @phx13ye #4 不需要,就配成 https://hub-mirror.c.163.com 就可以了
    phx13ye
        6
    phx13ye  
    OP
       2017-05-04 23:35:25 +08:00
    @billlee 老哥稳,应该是 ustc 的问题,换成网易,我的天空星星都亮了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   948 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 20:57 · PVG 04:57 · LAX 13:57 · JFK 16:57
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.