this post was submitted on 11 Aug 2025
47 points (96.1% liked)

Selfhosted

60093 readers
935 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam.

  3. Posts here are to be centered around self-hosting. Please ensure it is clear in your post how it relates to self-hosting.

  4. Don't duplicate the full text of your blog or git here. Just post the link for folks to click.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require your active participation in selfhosting or related communities, or the post will be removed. No more than 10% of your posts or comments may be self-promotional, or your post will be removed. F/LOSS Exception: If your post is about a project that is completely open source & can be self-hosted in full without payment, and your account is at least 7 days old, your post is exempt from this rule as long as you continue to engage in comments.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 3 years ago
MODERATORS
 

I'm currently trying to install Docker on my old Raspberry Pi (3 Model B+) to host some personal projects. When I run docker run hello-world, I get:

Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/library/hello-world/manifests/sha256:ec153840d1e635ac434fab5e377081f17e0e15afab27beb3f726c3265039cfff": dial tcp [2600:1f18:2148:bc00:eff:d3ae:b836:fa07]:443: connect: network is unreachable

My Internet connection does not support IPv6 at all, which would explain why this error occurs. But how do I force docker-pull to only use IPv4?

you are viewing a single comment's thread
view the rest of the comments
[–] Zagorath@aussie.zone 1 points 10 months ago (1 children)

It’s like if you asked why the top gear in your car isn’t working and gave the model of car and engine type and gearbox

Except if I try and access the same domain using curl, it works fine. For some reason, Docker specifically is what's failing.

[–] tychosmoose@piefed.social 3 points 10 months ago (1 children)

Different programs have different defaults.

But in your situation which would be more helpful - prevent this one docker command from using ipv6 (likely more difficult), or preventing all commands from using your broken ipv6 config (likely easier)?

I have no idea about the first. Maybe some people know this detail. But I'm sure that with a distro and version that you're running, there are lots of people who could help with the second. Raspberry Pi 3B+ is the hardware. What software are you using?

[–] Zagorath@aussie.zone 2 points 10 months ago (1 children)

Whatever the latest version of Raspbian was a month or two ago when I installed it. uname -a outputs [...]6.12.25+rpt-rpi-v8[...]. /etc/os-release contains "Debian GNU/Linux 12 (bookworm)".

[–] tychosmoose@piefed.social 3 points 10 months ago (1 children)

Ok, so it's probably using NetworkManager. I would try disabling it in /etc/NetworkManager/NetworkManager.conf by adding a block like:

[ipv6]
addr-gen-mode=stable-privacy
method=disabled

Then sudo systemctl restart NetworkManager. Can't say for sure if this will work. I dislike using NetworkManager on my servers so I can't test if this works. But hopefully the before/after of ip addr is different.

Although it looks like your ip addr output posted an hour or so ago doesn't show any ipv6 addressing. Maybe the problem is solved now.

[–] Zagorath@aussie.zone 2 points 10 months ago (1 children)

Unfortunately not.

 docker run hello-world
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/library/hello-world/manifests/sha256:ec153840d1e635ac434fab5e377081f17e0e15afab27beb3f726c3265039cfff": dial tcp [2600:1f18:2148:bc00:eff:d3ae:b836:fa07]:443: connect: network is unreachable

Run 'docker run --help' for more information
[–] tychosmoose@piefed.social 2 points 10 months ago (2 children)

Well crap. Do you have no ipv6 address now in ip addr?

Guess I gave Docker too much benefit of the doubt and assumed it should failover to v4 once v6 was disabled. Bad assumption on my part.

Could it be a DNS problem? If you dig registry-1.docker.io +short does it return an ipv4 or v6 address?

It looks like there have been sporadic reports of problems from people since last year.

[–] Zagorath@aussie.zone 1 points 10 months ago (1 children)

Do you have no ipv6 address now in ip addr

Just comparing it by eye, there's no change.

zag@raspberrypi:~ $ man dig
No manual entry for dig
zag@raspberrypi:~ $ which dig
zag@raspberrypi:~ $ sudo apt install dig
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package dig

But if I ping it

$ ping registry-1.docker.io
PING registry-1.docker.io (107.20.112.188) 56(84) bytes of data.
[–] tychosmoose@piefed.social 2 points 10 months ago (1 children)

It's in the dnsutils package.

[–] Zagorath@aussie.zone 1 points 10 months ago
52.207.69.161
52.21.128.203
3.224.238.37
44.218.153.24
54.210.249.78
18.232.25.125
52.72.195.97
54.161.169.181
[–] MysteriousSophon21@lemmy.world 1 points 10 months ago (1 children)

Try adding {"ipv6": false} to your /etc/docker/daemon.json file (create it if it doesnt exist), then restart docker with sudo systemctl restart docker - this forces docker to use IPv4 only.

[–] tychosmoose@piefed.social 1 points 10 months ago

This flag seems to only disable ipv6 on the default Docker bridge network, not daemon-wide. At least per this discussion.