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.