Docker pull using ipv6 repositories

Issue: docker uses ipv6 repository for any image pull

OS: Ubuntu 24.04

App: Docker version 28.3.3, build 980b856

All docker pull results in:

Error Get "https://registry… 0.0s
Error response from daemon: Get “https://registry-1.docker.io/v2/”: dial tcp [2600:1f18:2148:bc01:da2b:6b52:2eb3:c5f8]:443: connect: network is unreachable

It appears that docker is using an ipv6 address rather that ipv4. Has something changed in docker?

Thanks

Don

The domain resolves to ipv4 A-Records and ipv6 AAAA-Records.

Your host seems to prefer the resolved ipv6 over the ipv4 ip. Of course, this requires your ipv6 stack to be setup properl.

What happens if you execute these commands on your host?

curl -6 https://registry-1.docker.io/v2/
curl -4 https://registry-1.docker.io/v2/

Thanks for the reply,

curl -6 https://registry-1.docker.io/v2/
curl: (7) Failed to connect to registry-1.docker.io port 443 after 8 ms: Couldn’t connect to server

curl -4 https://registry-1.docker.io/v2/
{“errors”:[{“code”:“UNAUTHORIZED”,“message”:“authentication required”,“detail”:null}]}

My suspicion was along the ipv6 line as well. After I posted and in the process of trouble shooting I disabled IPv6 on my server. So I suppose that is why the curl -6 failed.

I don’t understand why I am getting the ‘unauthorized’ error as I have never seen that since I setup docker about 18 months ago. My next step in debugging is to find out why my DNS resolver is suddenly asking for IPv6 addresses first and then IPv4. Then I will tackle the authorization error.

So, in the meantime, if you have any other ideas, they would be welcome.

Don

Everyone gets the error on a simple curl request, if it provides no auth information.

Indeed, thecurl -6 testcommand doesn’t make any sense if ipv6 is disabled.

I’m having this exact problem. Identical command output.

I have 2 laptops, one is Debian 12, one Debian 13.

Neither are connected via ipv6. Both have the same output to curl -4 and curl -6 as bbnd1445 above.

The Debian 12 machine is able to pull repositories without any problem docker pull hello-world works as expected.

The Debian 13 machine not able to pull repositories, and seems to be trying to request them via ipv6, with the same “network is unreachable” output shown above.

This issue seems to have been reported in several other threads in these forums but none have ever reached (or mentioned?) a resolution.

Not that it really matters, but I had the same problem about 3 or 4 weeks ago. (see above) This was on my home server. I disabled DNS, I updated the OS and I updated docker and all the images. Oh, yeah, I disabled IPv6 on my host (Ubuntu 24.04) all to no avail. I just left it for about 4 hours and when I came back, it was working. :person_shrugging::person_shrugging::person_shrugging:

Should have said restarted DNS

Sure. I’ve been coming back to this over several days, so no amount of waiting or rebooting or reconnecting to my network has changed the situation.

For now I’ve found a workaround - a wireguard connection supporting ipv6.

My issue is not solved though, and I have no ideas on how to narrow down the problem or determine a solution.