When you create a new docker image that is part of a container composition that you want to run on one and the same host, you can run into the issue that the independent containers are not able to reach each other via DNS resolving.
So lets assume you have the following compose file where you want the web tier to be able to reach the database tier given the following compose file:
Based on this compose file the web tier should be able to resolve the database by the network name db and the db should be able to resolve the web tier by the name web.
Unfortunately at the moment there is a bug that should be fixed soon. the work around this at the moment is as follows:
in the docker files where you build your containers, you need to add the following statement:
#FIX DNS issues currently in Windows Containers
RUN powershell set-itemproperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters' -Name ServerPriorityTimeLimit -Value 0 -Type DWord
You need to add this line to each container that needs to reach out on the network and find the other container when using the NAT network.
So in case of my example this needs to be added to the Docker file of the web application, since it will go out and try to reach the database.
Hopefully this will be fixed soon, but in the meanwhile this can help you make things work.