I'm running Docker Desktop on Windows 10 with WSL virtualization, and I've been facing a major issue with DNS resolution. Initially, everything was fine until I ran out of space on my system drive, which led me to move my WSL distros (Ubuntu and Docker Desktop) to a different drive (F drive). After this move, I could only access my containers via localhost and not through my LAN IP. I reinstalled Docker Desktop, which fixed the LAN IP access problem, but now it takes an unbearable 3-5 minutes to resolve DNS for my containers. I'm using Caddy as a reverse proxy and I'm at a loss on how to troubleshoot or fix this.
4 Answers
This sounds more like a WSL and networking issue rather than a Docker Desktop problem. Docker on Windows can be quite unreliable for some users. Have you considered alternatives to Docker Desktop? Even though some folks claim it works great for them, there are plenty of others who run into these types of issues regularly.
Could you share the steps you took to reset your network? It sounds like you did all the right things. Just to confirm, did you remove the WSL Ethernet adapter too? What you've described seems like the right process, but I can double-check if needed.
Check if your primary DNS resolver is functioning properly. It seems like your container might be trying to access some resources that are broken or unreachable. Make sure everything is set up correctly.
There's a well-known bug in the WSL/Hyper-V networking that can lead to these DNS issues. People often have to modify WSL DNS settings when they shouldn't need to. The only solution I found effective was to delete the Hyper-V switch, perform a complete network reset via PowerShell, and then recreate the switch.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures