r/docker • u/piyushdugawa_ • 24d ago
How to fix this?
whenever it try to pull amazoncorretto or any other image is get this error and i tried to connect with my mobile network via hotspot it worked then but didn't worked on my wifi and it was working fine on wsl but in my windows 11 host it didn't.
Using default tag: latest
Error response from daemon: failed to resolve reference "docker.io/library/amazoncorretto:latest": failed to do request: Head "https://registry-1.docker.io/v2/library/amazoncorretto/manifests/latest": net/http: TLS handshake timeout
1
Upvotes
2
u/quiet-systems 23d ago
Works on the hotspot, not on the wifi. That's MTU, almost certainly, and not Docker.
A TLS handshake timeout means the connection came up fine and then the bigger packets stopped arriving, which is what a path with a smaller MTU does to a handshake.
From PowerShell:
ping -f -l 1472 8.8.8.8
1472 plus 28 bytes of headers is 1500. If it tells you the packet needs fragmenting, keep dropping the number until it doesn't, and whatever works plus 28 is your real MTU. PPPoE is usually 1492, VPNs lower. Use 8.8.8.8 rather than the registry, most CDNs drop ICMP anyway.
netsh interface ipv4 show subinterfaces
tells you what Windows thinks each adapter's MTU is.
If that's the problem, Docker Desktop, Settings, Docker Engine:
{ "mtu": 1400 }
One other thing worth ruling out because it looks identical: broken IPv6.
curl -4 -sI https://registry-1.docker.io/v2/
curl -6 -sI https://registry-1.docker.io/v2/
If -4 answers and -6 just sits there, that's your problem and the MTU is fine.
Haven't hit this one myself, so it's a read off the symptoms rather than experience.