for-win icon indicating copy to clipboard operation
for-win copied to clipboard

Windows 10 Docker Network DNS doesn't work after reboot

Open BenjaminThomson opened this issue 9 years ago • 2 comments

I think this is an issue although it may just be a bad configuration/setup on my part but either way some guidance would be really helpful as I would like to use containers on an azure win server VM in production.

Expected behavior

Create new containers on the existing NAT network or a custom network and they can ping each other by their assigned container name even after restarting the node and the containers.

Actual behavior

Detailed example is below but...

I connect new containers to the NAT network (see example below) and they can all ping each other (by attaching to an instance of in the container powershell) I then reboot my development machine and start all containers and they sometimes don't have IP addresses and/or they can no longer ping each other by name (even if they have IP addresses). If IP addresses have been assigned they can ping those.

Information

I have added a scenario below but it is also documented in a stackoverflow question I created (http://stackoverflow.com/posts/42418077/edit)

Steps to reproduce the behavior

I have the following setup:

  • 2 Docker containers (built using the Microsoft/ASP.NET image as a base) running a .NET MVC application in each.
  • 1 Docker container running SQL server (built using the Microsoft/mssql-server-windows image)

When I create all 3 containers I can attach to them and ping all other containers using their names without any issue. The applications run and can communicate with each other as I hoped.

However, when I reboot my machine and start all the containers again they can no longer ping/communicate with each other using their names (using IP addresses is fine).

I've tried this on the default NAT network and also tried replacing the NAT network with my own custom NAT network.

To resolve the issue I have to run the force network disconnect command for each container as such:

docker network disconnect nat <containername> --force

And then I have to reconnect each container to the network before starting them up. All containers can then ping/communicate with each other using their names as well as their IP addresses.

FYI, this is a development environment but I was hoping to do something similar in Azure using a Windows Server 2016 VM, although I don't quite know what the best network configuration is for live production yet as I need to have multiple applications (in separate containers) on the same node accessed via their own subdomains.

BenjaminThomson avatar Feb 28 '17 11:02 BenjaminThomson

Any news on this? Am I just doing things wrong or is this an issue? Would love to go ahead and use docker for windows in production but a bit worries that it's not quite there yet.

BenjaminThomson avatar Mar 23 '17 14:03 BenjaminThomson

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

docker-robott avatar Jun 20 '20 03:06 docker-robott