V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
ysmood
V2EX  ›  程序员

国内有 ghcr.io 的镜像加速吗?

  •  
  •   ysmood ·
    ysmood · Aug 31, 2021 · 9531 views
    This topic created in 1701 days ago, the information mentioned may be changed or developed.

    类似 https://hub-mirror.c.163.com 这种的免费服务有吗?

    12 replies    2024-07-02 10:04:37 +08:00
    Jays
        1
    Jays  
       Aug 31, 2021
    貌似没有,hassio 更新都会被 ghcr.io 卡死。。。。。。
    ysicing
        2
    ysicing  
       Aug 31, 2021
    可以自己搭建一个 proxy
    Mitt
        3
    Mitt  
       Aug 31, 2021
    docker 的 mirror 仅适用于隐式的比如 hub.docker.io ,所以这种第三方的都很少有 mirror,连 k8s 的镜像国内都很难办,得直接改每个镜像地址还得有专门的反代才行
    offswitch
        4
    offswitch  
       Aug 31, 2021
    @Mitt 如果 docker 能支持就好了,没有网址或者 ip 为前缀的,根据 daemon.json 中配置的 registry 顺序查找。
    Mitt
        5
    Mitt  
       Aug 31, 2021
    @offswitch 没有网址和前缀的是因为隐性的有个前缀叫 hub.docker .io (以下叫 A 域名, V2EX SPAM 警告了),并不是真的没有,所以才不支持的,比如 xxx/yyy 实际上是 [A 域名]/xxx/yyy 当你有 registry 的时候它会请求 [B 域名]/xxx/yyy,这时候 [B 域名] 其实是反代的 A 域名 来实现
    KagurazakaNyaa
        6
    KagurazakaNyaa  
       Aug 31, 2021
    @offswitch 可以试试用 artifactory 或者 nexus 的聚合仓库做 mirror
    Latin
        7
    Latin  
       Aug 31, 2021
    offswitch
        8
    offswitch  
       Aug 31, 2021
    @Mitt 这个我知道,我的意思是,如果 daemon.json 里面配置了 registry,那么就按照 daemon.json 中 registry 顺序查找,而不是使用 docker.io 的。实际上这个大概率跟 docker 的商业策略有关,不是实现不了,而且 docker 要赚钱那
    Mitt
        9
    Mitt  
       Aug 31, 2021 via iPhone
    @offswitch 你还是没理解,你说的这个功能本身就有
    MoeMoesakura
        10
    MoeMoesakura  
       Aug 31, 2021
    CF Worker 自己搭反向代理?
    cloverzrg2
        11
    cloverzrg2  
       Sep 1, 2021
    自己部署一下加速器试试。部署 registry 镜像,使用下面这个配置文件,把 proxy.remoteurl 改为 ghcr.io 的地址,试试
    ```
    version: 0.1
    log:
    level: info
    formatter: text
    fields:
    service: registry
    accesslog:
    disabled: false
    storage:
    cache:
    blobdescriptor: inmemory
    filesystem:
    rootdirectory: /data
    http:
    addr: :5000
    headers:
    X-Content-Type-Options: [nosniff]
    proxy:
    remoteurl: https://registry-1.docker.io
    health:
    storagedriver:
    enabled: true
    interval: 10s
    threshold: 3
    ```
    bxmysg
        12
    bxmysg  
       Jul 2, 2024
    可以试试这个镜像站 https://docker.aityp.com 可以在网站里面搜到镜像
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5641 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 60ms · UTC 07:22 · PVG 15:22 · LAX 00:22 · JFK 03:22
    ♥ Do have faith in what you're doing.