ghcr.io - 网络无法访问

问题描述 投票:0回答:1

我正在尝试使用 Docker 下载主页仪表板:

docker run -p 3000:3000 -v /path/to/config:/app/config -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/gethomepage/homepage:latest

但我得到这个输出:

Unable to find image 'ghcr.io/gethomepage/homepage:latest' locally
docker: Error response from daemon: Get "https://ghcr.io/v2/": dial tcp 140.82.121.34:443: connect: network is unreachable.
See 'docker run --help'.

所以,我尝试了:

ping ghcr.io

不起作用,显示网络不可达。

我还尝试了 ping google.com,它确实有效,表明我仍然有一些互联网连接。

这是我的 ifconfig:

docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
    inet6 fe80::42:ceff:fed9:d3bb  prefixlen 64  scopeid 0x20<link>
    ether 02:42:ce:d9:d3:bb  txqueuelen 0  (Ethernet)
    RX packets 76  bytes 4360 (4.2 KiB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 47  bytes 4862 (4.7 KiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet 192.168.1.12  netmask 255.255.255.0  broadcast 192.168.1.255
    inet6 2001:861:3dc1:2660:223:24ff:febc:89d7  prefixlen 64  scopeid 0x0<global>
    inet6 fe80::223:24ff:febc:89d7  prefixlen 64  scopeid 0x20<link>
    ether 00:23:24:bc:89:d7  txqueuelen 1000  (Ethernet)
    RX packets 9018  bytes 963609 (941.0 KiB)
    RX errors 0  dropped 3713  overruns 0  frame 0
    TX packets 3426  bytes 432387 (422.2 KiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    device interrupt 16  memory 0xdf000000-df020000

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
    inet 127.0.0.1  netmask 255.0.0.0
    inet6 ::1  prefixlen 128  scopeid 0x10<host>
    loop  txqueuelen 1000  (Boucle locale)
    RX packets 0  bytes 0 (0.0 B)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 0  bytes 0 (0.0 B)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth02152d0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet6 fe80::e42f:e2ff:fe8a:a94b  prefixlen 64  scopeid 0x20<link>
    ether e6:2f:e2:8a:a9:4b  txqueuelen 0  (Ethernet)
    RX packets 39  bytes 2786 (2.7 KiB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 36  bytes 3354 (3.2 KiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

你能帮我解决这个问题吗?

docker docker-network github-package-registry ghcr
1个回答
0
投票

我在Hetzner IPv6 only机器上遇到了同样的问题。错误的原因似乎是,ghcr.io 不提供 IPv6 AAAA DNS 记录。有一个 2023 年 11 月的未决问题提到了它。

我个人通过使用不同的镜像注册表解决了这个问题,在我的例子中是DockerHub,它允许自由托管公共镜像。

© www.soinside.com 2019 - 2024. All rights reserved.