I have a windows docker container running on win server 2016
The the site running in the container is accessible from other nodes on the network.
The container has access to the internet (it can access 3rd party nodes external to the network), but it is unable to connect to other nodes in the network.
When an app running in the container tries to access a service on another machine in the network (machine_name) it gets the following error:
The remote name could not be resolved: machine_name
When the app tries to connect to a database on the network:
A network-related or instance-specific error occurred while establishing a connection
So it looks like the container does not have access or cannot find the machines on intranet
I ran docker exec -ti e87633560c6c ipconfig /all
and got the following:
Windows IP Configuration
Host Name . . . . . . . . . . . . : gmsa_acct
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter vEthernet (Container NIC 0b35fe9f):
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #2
Physical Address. . . . . . . . . : 00-15-5D-30-F4-1D
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::7939:903e:141f:5c98%24(Preferred)
IPv4 Address. . . . . . . . . . . : 172.22.223.136(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.240.0
Default Gateway . . . . . . . . . : 172.22.208.1
DNS Servers . . . . . . . . . . . : 172.22.208.1
10.xxx
10.xxx
NetBIOS over Tcpip. . . . . . . . : Disabled
I ran this command in the machine that the container is running on
docker exec e87633560c6c nltest /sc_verify:mydomain.com
Flags: b0 HAS_IP HAS_TIMESERV
Trusted DC Name \\D1dns01.mydomain.com
Trusted DC Connection Status Status = 0 0x0 NERR_Success
Trust Verification Status = 0 0x0 NERR_Success
The command completed successfully
The strange thing is that the same container ran on another host without any issues. We are now trying to run it on a new host and are getting the above issues.
Any help is appreciated.
Thanks.
EDIT: I am able to connect via the IP address and not the machine name. How can I connect via the machine name?