Navcontainerhelper: WARNING: DNS resolution not working from within the container.

Created on 5 Feb 2019  路  3Comments  路  Source: microsoft/navcontainerhelper

Today we were installing docker on Windows on laptops that are part of our domain. Everything seemed to go fine. After that installed the navcontainerhelper module and ran the New-NavContainerHelper cmdlet.

While running we got the warning: DNS resolution not working from within the container.

Everything else looked fine, but could not connect the Dynamics NAV IDE to the database and could also not connect MSSSMS to the SQLEXPRESS instance. We checked that it was running (and it did). One very clever guy suggested to connected by means of IP address of the docker container. OK, good workaround for now, but how could we resolve that we could use the DNS?
IS there something the New_NavContainerHelper could fix ?

All 3 comments

@lvanvugt -updatehosts as param for New-NavContainerHelper should do the trick. It adds an entry to your hosts file

Hey Tobi, thanx for the fast tip. Had overlooked that parameter. Working now.

That warning is not caused by dns resolution on the host.
It is caused by the container not being able to do DNS lookup from within the container.
This means that if you enter the container and try to ping www.microsoft.com - it will fail.
This blog post describes how to fix this: http://www.robertbird.co.uk/development/docker-networking-tips-and-tricks.
Note that your network might not allow to use 8.8.8.8 as dns - then you maybe need to set the DNS from your host as a DNS on docker as well.

Was this page helpful?
0 / 5 - 0 ratings