docker desktop claims .internal DNS on Windows?

Was having trouble pinging tunneled fly domain names while running docker desktop on Windows. Docker appears to use names like host.docker.internal though they are only in the hosts file. When docker desktop is running, the wireguard tunnel fly-app-name-1234.internal lookups fail at least half of the time.

Well that’s surprising. They’re just messing with the hosts file, though, not hijacking a resolver?

DNS is so tricky to get right we’re spending more time making flyctl commands just work. If anyone knows how to make DNS + wireguard resolve .internal reliably on Windows, though, we’re all ears.

I am also experiencing issues possibly related to this. I am on Windows (not in WSL). I have Docker installed and I’m experiencing issues resolving .internal addresses. My best guess is that it isn’t Docker related. But it is intermittent so very difficult to figure out what’s going on.

  • Docker did put a few entries in the hosts file
  • I started experiencing this using Postgres (Azure Data Studio and PSQL) but it seems larger than that.
  • nslookup consistently returns the proper IP address for both my app and Postgres.
  • Pinging my app using .internal works … sometimes – but rarely. There doesn’t seem to be a pattern.
  • Azure Data Studio also has issues connecting using .internal. I’ve seen it work once but not consistently.
  • Pinging or using the IP directly seems to work in all cases.
  • Many other VPNS are installed but none are active at this time.
  • I messed around with some of the options here: windows - Why is ‘ping’ unable to resolve a name when ‘nslookup’ works fine? - Super User
    • Putting the dot at the end didn’t seem to make a difference
    • ipconfig /flushdns followed by ipconfig /registerdns allowed it to work once – then it failed. And now it doesn’t work after trying again.

I uninstalled Docker and it had no effect.

I only had to stop it but the reliability of that solution is not clear.