Docker Community Forums

Share and learn in the Docker community.

Docker for Windows does not correctly set DNS server


(Alex Wellock) #1

Expected behavior

Setting DNS in the settings should set it in /etc/resolve.conf and be used for DNS both in the containers and the vm.

Actual behavior

The setting is ignored.

Information

In the network settings set DNS server to 8.8.8.8

In logs during start up
[11:44:44.009][ApiProxy ][Info ] Started
[11:44:44.012][Database ][Info ] Writing com.docker.driver.amd64-linux/net/config=static
[11:44:44.013][Database ][Info ] Writing com.docker.driver.amd64-linux/net/address=10.0.75.2
[11:44:44.023][Database ][Info ] Writing com.docker.driver.amd64-linux/net/netmask=255.255.255.0
[11:44:44.026][Database ][Info ] Writing com.docker.driver.amd64-linux/net/gateway=10.0.75.1
[11:44:44.031][Database ][Info ] Writing com.docker.driver.amd64-linux/etc/resolv.conf=nameserver 10.0.75.1
[11:44:44.033][Database ][Info ] Writing com.docker.driver.amd64-linux/network=hybrid

Errors reaching DNS latter during the start up process

[11:45:40.473][VpnKit ][Error ] com.docker.slirp.exe: Error reading /etc/resolv.conf: reading /etc/resolv.conf: Uwt.Uwt_error(Uwt.ENOENT, “uv_fs_open”, “/etc/resolv.conf”)
[11:45:40.475][VpnKit ][Debug ] com.docker.slirp.exe: DNS[2d2d] Forwarding to 10.0.75.1 (secondary(wrapped))
[11:45:40.480][VpnKit ][Debug ] com.docker.slirp.exe: Socket.Datagram.input 192.168.65.2:42306-10.0.75.1:53 (DNS[2d2d]): creating UDP NAT rule
[11:45:40.481][VpnKit ][Error ] com.docker.slirp.exe: Error reading /etc/resolv.conf: reading /etc/resolv.conf: Uwt.Uwt_error(Uwt.ENOENT, “uv_fs_open”, “/etc/resolv.conf”)
[11:45:40.483][VpnKit ][Debug ] com.docker.slirp.exe: DNS[2d2d] Forwarding to 10.0.75.1 (primary(sole))
[11:45:41.283][HyperV ][Info ] Wait for the VM to get an IP address
[11:45:41.873][VpnKit ][Info ] com.docker.slirp.exe: hvsock connected successfully
[11:45:41.891][VpnKit ][Info ] com.docker.slirp.exe: Using protocol TwoThousand msize 8192
[11:45:42.415][HyperV ][Info ] Wait for the VM to get an IP address
[11:45:42.957][VpnKit ][Debug ] com.docker.slirp.exe: DNS[2d2d] 192.168.65.2:42306 -> 192.168.65.1 2d2d Query:0 na:c:r:rn 0 <qs:moby.local. <A|IN>> an: au: ad:
[11:45:42.961][VpnKit ][Error ] com.docker.slirp.exe: Error reading /etc/resolv.conf: reading /etc/resolv.conf: Uwt.Uwt_error(Uwt.ENOENT, “uv_fs_open”, “/etc/resolv.conf”)
[11:45:42.972][VpnKit ][Debug ] com.docker.slirp.exe: DNS[2d2d] Forwarding to 10.0.75.1 (primary(sole))
[11:45:42.978][VpnKit ][Debug ] com.docker.slirp.exe: DNS[2d2d] 192.168.65.2:42306 -> 192.168.65.3 2d2d Query:0 na:c:r:rn 0 <qs:moby.local. <A|IN>> an: au: ad:
[11:45:42.982][VpnKit ][Error ] com.docker.slirp.exe: Error reading /etc/resolv.conf: reading /etc/resolv.conf: Uwt.Uwt_error(Uwt.ENOENT, “uv_fs_open”, “/etc/resolv.conf”)
[11:45:42.983][VpnKit ][Debug ] com.docker.slirp.exe: DNS[2d2d] Forwarding to 10.0.75.1 (secondary(wrapped))

Windows

Steps to reproduce the behavior

  1. …Set DNS
  2. …Reboot DNS will not be updated

(Michael Chiang) #2

Thanks for sending this in. I have documented this. We will try to reproduce this.

In the meantime, would it be possible for you to give us more information?

  1. Which windows version are you using (if possible the build number as well)?
  2. Which Docker for Windows version are you running?

Thanks for using Docker!


(Alex Wellock) #3

I am using windows version 1511 build 10586.545 and the docker for windows version is 1.12.0-stable build 5968.


(Phppro) #4

I wonder if the issue I am seeing is the same thing. When in a container I cannot access our local git server by dns name, only by ip address.

I am running Windows 10 enterprise version 1511, build 10586.164 and docker version 1.12.0 build 8eab29e.


(Alex Wellock) #5

Hey Michael,

Looks like this got fixed in the latest experimental build.

Thanks for looking into it.