56
国内有 ghcr.io 的镜像加速吗?
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.
国内有 ghcr.io 的镜像加速吗?
11 条回复 • 2021-09-01 16:21:22 +08:00
Mitt 1 天前
docker 的 mirror 仅适用于隐式的比如 hub.docker.io ,所以这种第三方的都很少有 mirror,连 k8s 的镜像国内都很难办,得直接改每个镜像地址还得有专门的反代才行
Mitt 1 天前
@offswitch 没有网址和前缀的是因为隐性的有个前缀叫 hub.docker .io (以下叫 A 域名, V2EX SPAM 警告了),并不是真的没有,所以才不支持的,比如 xxx/yyy 实际上是 [A 域名]/xxx/yyy 当你有 registry 的时候它会请求 [B 域名]/xxx/yyy,这时候 [B 域名] 其实是反代的 A 域名 来实现
offswitch 22 小时 17 分钟前
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
```
```
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
```
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK