Repository navigation
Description
I think I've found a Windows container networking problem that's caused by changing networks.
I'm running Windows 10 with WS2016 TP5 in a Hyper-V VM.
I set up the VM in the Docker office, which happens to use Comcast. As mentioned in the docs, a NAT-style containernetwork is created automatically, and it'll get the current host DNS setup baked in. This can be checked with Get-ContainerNetwork | fl on the WS2016 guest, and shows that the DNS servers used are 75.75.75.75 and 75.75.75.76. These are Comcast's DNS servers.
Get-ContainerNetwork | fl
WARNING: Based on customer feedback, we are updating the Containers PowerShell module to better align with Docker. As part of that some cmdlet and parameter names may change in future releases. To
learn more about these changes as well as to join in the design process or provide usage feedback please refer to http://aka.ms/windowscontainers/powershell
Name : nat
SubnetPrefix : {172.16.0.0/12}
Gateways : {172.16.0.1}
Id : e11981e0-441e-4bb5-8030-9fad2c3ff2a4
Mode : NAT
NetworkAdapterName :
SourceMac :
DNSServers : {75.75.75.75, 75.75.76.76}
DNSSuffix : docker.com
IsDeleted : False
The problem is when I move my Windows 10 laptop to a different network, for example my apartment where I use Sonic.net. Comcast's DNS servers will still be baked into the ContainerNetwork entry on the WS2016 host, but those are no longer useful, I think because Comcast refuses to respond to DNS queries not originating from their subscribers. This means that DNS no longer resolves from containers (the WS2016 hyper-v guest seems to be fine though - only the containernetwork is affected).
Removing and re-creating the containernetwork seems to solve the problem.
Note that --dns doesn't work with Windows containers.
Activity
lowenna commentedon May 22, 2016
Actually networking should ping @msabansal
neilpeterson commentedon May 22, 2016
@friism this is a know issue. A bug being tracked by @JMesser81
PatrickLang commentedon Nov 17, 2016
@kallie-b this might be one for you to track
kallie-b commentedon Nov 18, 2016
Yep, it seems to be! I'll get on it.
jamiegs commentedon Feb 25, 2019
Has anything been done to help with this issue? It's been open for nearly 3 years. I've been having similar problems when networks change on windows.
lowenna commentedon Feb 25, 2019
@daschott