Docker Community Forums

Share and learn in the Docker community.

Docker hostname and other container resolution via name don't work on windows 2019 server, works on docker for windows

Hello,
First of all please excuse me if I write here and it’s not the right place. I’ve got the following issue that’s taking me a lot of time and really I don’t know how to resolve it.

Here’s the scenario. I’ve got 2 containers one build on nodejs and the otherone with alpine. The Nodejs should resolve the hostname since there’s MSSQL installed and the alpine one should resolve the nodejs via container name.

I’ve developed a working solution on my machine wich is a win10 with Docker For Window latest version.
I’ve created a bridged network and it really works fine.

Then I moved on the Windows 2019 Server where I installed the Container feature, the docker cli and enabled experimental feature + linux kernel driver.

First trouble… I’ve not the bridged connection but NAT only… reading on the docs, it should behave the same…
I’ve created my containers, associated the network but no way of resoling via name… or to resolve the hostname

What’s really strange is that I got the following dns suffix I don’t know where it cames from

** server can't find n6.mshome.net: SERVFAIL

** server can't find n6.mshome.net: SERVFAIL

/ # nslookup n6.net1
Server:         192.168.240.1
Address:        192.168.240.1:53

** server can't find n6.net1: SERVFAIL

** server can't find n6.net1: SERVFAIL

/ # nslookup n6.net1.local
Server:         192.168.240.1
Address:        192.168.240.1:53

** server can't find n6.net1.local: SERVFAIL

** server can't find n6.net1.local: SERVFAIL

/ # nslookup n6.net1.internal
Server:         192.168.240.1
Address:        192.168.240.1:53

** server can't find n6.net1.internal: SERVFAIL

** server can't find n6.net1.internal: SERVFAIL

Any suggestion?
Thanks

Unfortunately local hostname resolve does not seem to work in latest Docker for Windows releases (up to 2.1.0.1 so far)

The only possible solution that I’ve found is to downgrade to Docker for Windows 2.0.0.3

Beware: you need to uninstall current installation in order to install release 2.0.0.3. So you’ll lose all of your data(containers, images etc.)

Thanks a lot, and about container resolution? I’ve also read that NAT network are not persisted…why??