I’m running into an issue when trying to pull a dev container image locally. The same container works fine in GitHub Codespaces, but on my local Windows machine, pulling fails consistently with an EOF error.
Interesting: it works on docker-ce, but fails on Docker Desktop for Windows.
I tried: docker pull mcr.microsoft.com/devcontainers/universal:3.0.3-linux
Update: Seems the different is that my Windows host prefers the resolved ipv6 address for mcr.microsoft.com, while my Linux host prefers the ipv4 address.
Update2: just fyi: it is unrelated to whether containerd is used as image store or not.
It is not about Docker Engine settings, but how your host machine resolves domain names to IP addresses.
As a temporary “solution”, you can change your hosts file on Windows. I tried this to reproduce the issue with IPv6 address and the docker pull command worked only when I chose the ipv4 address.
nslookup mcr.microsoft.com
You will find ipv4 and ipv6 addresses. Choose one IPv4 address and add the following line:
X.X.X.X mcr.microsoft.com
to
C:\Windows\System32\drivers\etc\hosts
as an administrator.
So it could be an issue on Microsoft’s side with the IPv6 address.
PS C:\Users\metin> docker pull mcr.microsoft.com/devcontainers/universal:3.0.3-linux
Error response from daemon: failed to resolve reference "mcr.microsoft.com/devcontainers/universal:3.0.3-linux": failed to do request: Head "https://mcr.microsoft.com/v2/devcontainers/universal/manifests/3.0.3-linux": EOF
Now the question is whether ipv6 support is required for any website. If not, disabling ipv6 is better than modifying the hosts file as it could also cause problems when IP addresses change.
We don’t recommend disabling IPv6, unless you are absolutely sure any other applications won’t use it, and even then some Windows services might require it.
After reading the thread, it’s unclear to me why this happens. Any other pull from MCR works? Is it just this image? Is it with just one version of Docker? I’d rather fogure out why this is failing with IPv6 enabled and fix that than disabling IPv6.
I agree, as you pointed out in the other thread, that this should be raised as an issue directly with the MCR team. I don’t think they have an open/external channel of communication (like the Windows containers, AKS teams for example) so I’ll raise this internally. I can report back once I have news from that team.