-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot resolve a host from a local hosts entry #1245
Comments
I believe that #1302 does address this:
(Tested by adding a host on the Windows side, and running an |
Sounds like this should be fixed then. Please open a new issue if you still have problems resolving DNS with the next release! |
@jandubois This issue reopens in 1.17 (I upgraded from 1.16 to 1.17 , in 1.16 it was working ok) Container Engine :dockerd ( moby) Environment details .wslconfig [experimental] ============= 172.26.80.1 rd-local --Steps to reproduce -- start a basic alpine: C:>docker run -it --rm alpine sh ===== Pinging rd-local [172.26.80.1] with 32 bytes of data: Ping statistics for 172.26.80.1: |
Rancher Desktop Version
0.7.1
Rancher Desktop K8s Version
1.22.5
What operating system are you using?
Windows
Operating System / Build Version
Windows 10 Enterprise 21H2
What CPU architecture are you using?
x64
Windows User Only
No response
Actual Behavior
An entry in the local hosts file cannot be resolved inside a running container depending on the resolve method of the linux running inside the container.
Steps to Reproduce
Start RancherDesktop with dockerd as the container runtime.
Make an entry in your local c:\Windows\system32\drivers\etc\hosts like
10.3.6.25 host.docker.internal
start a basic alpine:
docker run -it --rm alpine sh
In the started container shell call
ping host.docker.internal
Result
The ping fails with the message
ping: bad address 'host.docker.internal'
Expected Behavior
The ping should succeed.
Additional Information
To make things more complicated:
The command
getent hosts host.docker.internal
in the alpine container returns the expected address
10.3.6.25 host.docker.internal host.docker.internal
Additionally if you start a basic ubuntu
docker run -it --rm ubuntu sh
and install ping in the running shell
apt update
apt install iputils-ping
The ping comand described above works out of the box.
So this is an issue with how a hostname is resolved in the running linux. I raise this issue because DockerDesktop does not have this problem with the alpine container.
The text was updated successfully, but these errors were encountered: