Open Bilge opened 1 year ago
I'm facing the same issue.
Docker version 25.0.2, build 29cf629 Image: ubuntu:24.04 Host OS: Windows 11 22H2 with WSL 2 backend
Are there any workarounds?
any news on this as it's impacting me too?
Docker version: 4.31.1 (153621) Image: Ubuntu 22.04 Host OS: Windows 11 Pro 23H2
A workaround is to configure the DNS server for the container to use, ie docker run --dns 8.8.8.8 --rm alpine nslookup 8.8.8.8
or
services:
my_service:
dns:
- 8.8.8.8
in a compose file.
This would sometimes break host.docker.internal
for me, so you have to manually add it as a host:
services:
my_service:
dns:
- 8.8.8.8
extra_hosts:
- host.docker.internal:host-gateway
Description
This issue is a repost of #10876 in its entirety, with the addition of reproduction steps, because it was closed prematurely but is still relevant today.
I've been developing on remote Docker on Linux installations for a while now. Recently I've been transitioning to local development on my Windows desktop. One thing I noticed right away is that reverse DNS lookups in containers on Docker Desktop for Windows appear to be broken:
I've tried several different IP addresses and container images all with the same result.
Reverse lookups work from the Debian WSL2 host. This all works inside containers on my Docker on Linux installations as well.
DNS resolution inside containers on Windows appears to be working as expected otherwise. The only thing not working is reverse lookups.
Reproduce
docker run --rm alpine nslookup 8.8.8.8
Expected behavior
Should be able to perform reverse DNS lookups in a container on Windows.
docker version
docker info
Diagnostics ID
C0FD2EB2-C125-4336-BA42-1881A5BDFA74/20230914134311
Additional Info
No response