56

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

 3 years ago
source link: https://www.v2ex.com/t/799069
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
国内有 ghcr.io 的镜像加速吗?
11 条回复    2021-09-01 16:21:22 +08:00

Jays

Jays   1 天前

貌似没有,hassio 更新都会被 ghcr.io 卡死。。。。。。

ysicing

ysicing   1 天前

可以自己搭建一个 proxy

Mitt

Mitt   1 天前

docker 的 mirror 仅适用于隐式的比如 hub.docker.io ,所以这种第三方的都很少有 mirror,连 k8s 的镜像国内都很难办,得直接改每个镜像地址还得有专门的反代才行

offswitch

offswitch   1 天前

@Mitt 如果 docker 能支持就好了,没有网址或者 ip 为前缀的,根据 daemon.json 中配置的 registry 顺序查找。

Mitt

Mitt   1 天前

@offswitch 没有网址和前缀的是因为隐性的有个前缀叫 hub.docker .io (以下叫 A 域名, V2EX SPAM 警告了),并不是真的没有,所以才不支持的,比如 xxx/yyy 实际上是 [A 域名]/xxx/yyy 当你有 registry 的时候它会请求 [B 域名]/xxx/yyy,这时候 [B 域名] 其实是反代的 A 域名 来实现

XiLingHost

XiLingHost   1 天前

@offswitch 可以试试用 artifactory 或者 nexus 的聚合仓库做 mirror

offswitch

offswitch   22 小时 17 分钟前

@Mitt 这个我知道,我的意思是,如果 daemon.json 里面配置了 registry,那么就按照 daemon.json 中 registry 顺序查找,而不是使用 docker.io 的。实际上这个大概率跟 docker 的商业策略有关,不是实现不了,而且 docker 要赚钱那

Mitt

Mitt   21 小时 5 分钟前 via iPhone

@offswitch 你还是没理解,你说的这个功能本身就有

MoeMoesakura

MoeMoesakura   20 小时 59 分钟前

CF Worker 自己搭反向代理?

cloverzrg2

cloverzrg2   2 小时 4 分钟前

自己部署一下加速器试试。部署 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
```

关于   ·   帮助文档   ·   FAQ   ·   API   ·   我们的愿景   ·   广告投放   ·   感谢   ·   实用小工具   ·   2771 人在线   最高记录 5497   ·  

创意工作者们的社区

World is powered by solitude

VERSION: 3.9.8.5 · 18ms · UTC 10:25 · PVG 18:25 · LAX 03:25 · JFK 06:25
♥ Do have faith in what you're doing.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK