Docker cannot resolve DNS name in the Linux Mode
- [x] I have tried with the latest version of my channel (Stable or Edge)
- [x] I have uploaded Diagnostics
- Diagnostics ID: 7DC3CEC9-F68A-4F55-BF7A-DB1DAF0BA1D1/20180727125730
Expected behavior
docker pull docker-proxy-ua:5000/oracle12:base base: Pulling from oracle12 Digest: sha256:1ff8b14ae44042122108d166fd5260c8da2cd4b5d73c14afd247db5ad06e6127 Status: Image is up to date for docker-proxy-ua:5000/oracle12:base
Actual behavior
docker pull docker-proxy-ua:5000/oracle12:base Error response from daemon: Get http://docker-proxy-ua:5000/v2/: dial tcp: lookup docker-proxy-ua on 192.168.65.1:53: server misbehaving
Information
- Windows Version: Windows 10 1803 (OS Build 17134.165)
- Docker for Windows Version: 18.06.0-ce-win72 (19098)
Docker don't resolve DNS name of my local registry after latest update. It occurs in the Linux Mode only. But it works when I point the IP address of the local registry or full name docker-proxy-ua.mydomain.com:5000/oracle12:base.
The same situation inside of Linux containers, but when I added the record 'search mydomain.com' in the /etc/resolv.conf file - it resolved the name.
nslookup docker-proxy-ua ;; Got SERVFAIL reply from 192.168.36.30, trying next server Server: 8.8.8.8 Address: 8.8.8.8#53 server can't find docker-proxy-ua: NXDOMAIN
After adding the record to the /etc/resolv.conf
nslookup docker-proxy-ua Server: 192.168.36.30 Address: 192.168.36.30#53 Name: docker-proxy-ua.mydomain.com Address: 192.168.36.37
I've temporary resolved this issue adding record in the 'hosts' file of Windows:
192.168.36.37 docker-proxy-ua
It seems that, the '/etc/resolv.conf' file inside of MobyLinuxVM doesn't have the record 'search'.
I'm having the same issue, not resolving names on our local network.
if I docker exec -it test_api_1 bash
on 18.06.0-ce-win72 (19098)
root@be17e5f25b02:/# cat etc/resolv.conf
nameserver 127.0.0.11
options ndots:0
MobyLinuxVM
/ # cat etc/resolv.conf
nameserver 192.168.65.1/ #
Previously on version Version 18.03.1-ce-win65 (17513)
root@be17e5f25b02:/# cat etc/resolv.conf
search localnetwork.local dev.localnetwork.local
nameserver 127.0.0.11
options ndots:0
MobyLinuxVM
/ # cat etc/resolv.conf
# Generated by dhcpcd from eth0.dhcp
# /etc/resolv.conf.head can replace this line
domain localnetwork.local
search localnetwork.local dev.localnetwork.local
nameserver 192.168.65.1
# /etc/resolv.conf.tail can replace this line
/ #
I've just tried to SSH to MobyLinuxVM using this manual: https://blog.jongallant.com/2017/11/ssh-into-docker-vm-windows/
Then I added the "search mydomain.com" record to the /etc/resolv.conf of the MobyLinuxVM and now all my Linux containers has the same records in their /etc/resolv.conf files, and successfully resolve DNS.

I compared logs c:\Users\ppavlov\AppData\Local\Docker\log* for both Docker 18.06.0 and 18.03.0 and found the vpnkit.exe updates incorrectly dhcp.json here c:\Users\ppavlov\AppData\Roaming\Docker.
[VpnKit][Info] vpnkit.exe: Update DHCP configuration to { searchDomains = mydomain.com; domainName = localdomain } - it is correct (docker 18.03)
[VpnKit][Info] vpnkit.exe: Update DHCP configuration to { searchDomains = mydomain.com; domainName = mydomain.com } - it is incorrect (docker 18.06)
I think this is a cause of the issue
I have the same issue.
I've made a prototype fix for this issue. If you'd like to test it the build is here: https://download-stage.docker.com/win/master/19209/Docker%20for%20Windows%20Installer.exe
Let me know if this helps or not. If not, could you upload a set of diagnostics and quote the diagnostics id? Thanks!
@djs55 commented on 2 Aug 2018, 14:25 BST:
I've made a prototype fix for this issue. If you'd like to test it the build is here: https://download-stage.docker.com/win/master/19209/Docker%20for%20Windows%20Installer.exe
Let me know if this helps or not. If not, could you upload a set of diagnostics and quote the diagnostics id? Thanks!
It works now. Thanks a lot. I'll update this thread if I find anything else.
Yes, it works for me too! Thank you!
Thank you @djs55 . This fixed the issue for me as well.
@djs55 - I'm afraid your 18.06.0-ce-win69 (19209) does not resolve the issue for me, diagnostics id is DB469F9E-AF0B-4EA5-ACAD-C1F248571CA6/20180807232723
(it also didn't help with #2389, which I was hoping might be related...)
Hello @djs55, it is strange but the build 18.06.0-ce-win69 (19209) doesn't work correctly on another host. The host has the same build of the Windows OS - 10 1803 (OS Build 17134.165).
I get the same error: "Error response from daemon: Get http://docker-proxy-ua:5000/v2/: dial tcp: lookup docker-proxy-ua on 192.168.65.1:53: no such host". Diagnostic ID is - D12D0703-B015-4ECA-B7CD-F7096252950A/20180813112242
Hi @djs55, Same issue here, resolved by your prototype fix ;) Thanks ! Any plan to merge it in the edge/stable channel ?
Hi!
#Hello @djs55, it is strange but the build 18.06.0-ce-win69 (19209) doesn't work correctly on another host. The host has the same build of the Windows OS - 10 1803 (OS Build 17134.165). I get the same error: "Error response from daemon: Get http://docker-proxy-ua:5000/v2/: dial tcp: lookup docker-proxy-ua on 192.168.65.1:53: no such host". Diagnostic ID is - D12D0703-B015-4ECA-B7CD-F7096252950A/20180813112242
It was occurring, because the host had static network settings without DNS suffix.
ipconfig /all
Connection-specific DNS Suffix . : (was empty)
Adding a suffix solved the issue.
The fix has been released on both edge and stable
- for edge: 18.06.1-ce-win74
- for stable: 18.06.1-ce-win73
@pavlovpetr thanks for your update. To check if I understand correctly: you have a local registry with FQDN docker-proxy-ua.mydomain.com and would like to access it via the short name docker-proxy-ua but this failed because VM didn't know about mydomain.com-- is that right? Did this break native Windows DNS lookups of docker-proxy-ua too, or did it work for some other reason?
BTW thanks for all your help and for trying the experimental builds -- this really helped me.
Hello
To check if I understand correctly: you have a local registry with FQDN docker-proxy-ua.mydomain.com and would like to access it via the short name docker-proxy-ua but this failed because VM didn't know about mydomain.com-- is that right?
Yes, it is right.
Did this break native Windows DNS lookups of docker-proxy-ua too, or did it work for some other reason?
This VM has manual network settings and some of them were incorrect. Another VM gets network settings via DHCP, so the prototype "18.06.0-ce-win69 (19209)" worked well on it.
Thank you very much!
@djs55 - did you get a chance to look at DB469F9E-AF0B-4EA5-ACAD-C1F248571CA6/20180807232723? I'm afraid 19209 did not fix the issue for me and a colleague on the same setup reported that the new edge/stable release won't start up at all for him :-(
I'm having a similar issue - when I pull from our internal registry the Linux VM seems to use the google DNS server rather than our internal DNS server.
Changing /etc/resolv.conf in the VM fixes this, but this state is lost the next time the VM is restarted. Nothing I change in the config makes any difference to the Linux VM DNS
- if I remote onto the VM (using docker run -it --rm --privileged --pid=host justincormack/nsenter1)
- run an nslookup for the registry DNS name, it fails
I can reproduce this in the 18.06.1-ce-win73 prototype build (referenced above) in the current stable 18.06 build and also in the 2.0.0-beta1 build.
Diagnostic Log submitted - 0BFB95E4-4745-4B05-A481-8330849134F5/20181009162530
Any advice on a fix/workaround appreciated!
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30d of inactivity.
Prevent issues from auto-closing with an /lifecycle frozen comment.
If this issue is safe to close now please do so.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale
This should be top on the priority list.
Edit: I confused it with another issue. This can be closed now.
I agree this was fix a while back
Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.
If you have found a problem that seems similar to this, please open a new issue.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle locked