No internet access from Windows container

I’ve installed the latest eta channel Docker for Windows (1.13.0-rc2) and trying to get a container up and running but it doesn’t appear to have access to the internet. The command docker run microsoft/nanoserver ping doesn’t get any response.

When switching to Linux containers networking is fine. The host machine is Windows 10 build 14393.479

Is there something fundamental I’ve missed here?

1 Like

Could you try running the Windows diagnostics scripts?

Also consider running the built-in diagnostics and post an issue here:

Thanks, I ran the Debug-ContainerHost.ps1 script and it flagged up an issue with 'Do not have DisableVSmbOplock set' which I fixed but didn’t help.
How do I run the built-in diagnostics? If I try the Diagnose & Feedback item in the system tray app it just tells me there aren’t any settings for Windows containers yet.

Can anyone help here please? This is really getting frustrating and I’m starting to lose faith in Windows containers.

I just solved this issue today for myself, it maybe different for you though.
I noticed that the network adapter on Windows (acting as a router to the docker VM) and the docker VM adapter talking to the host machine didn’t have a default gateway.
So I added the IP of my router to the gateway on adapter in Windows that acts as the router for the VM. I rebooted the VM, and docker worked.

This was on my work computer, at home docker in Windows worked with no issues

1 Like

Hi msnelling,
This works for me (using Docker for Windows):

  • Open Hyper-V Manager (Windows search : “Hyper-V …”)
  • Go to Virtual Switch Manager on the right side.
  • Go to DockerNAT then choose Connection type -> to External network -> #which interface you deside.
    Hope that help you, too.

It works for me. I just go to network settings and change the Docker NAT Adapter IPV4 config to auto detect IP and DNS. Thanks

Thanks this resolved my issue, just need to restart my docker after changes :slight_smile:

1 Like

I had a similar problem, and previously to start to using Hyper-V I had VirtualBox installed in my machine, and the solution for me was disabling the Network Connection used for VB called VirtualBox Host-Only Network. If you won’t use VB in the future you can even delete that Network Connection.

1 Like

Hello There,

I am having the same issue and ran the given diagnostic command and gives me following can you please help?

I have a VM Win 2016 Data Center hosted on Azure and on that I have created windows Docker container, I need internet access to it so that I can install choclatey\azure RM directly.

I have set the environment of the proxy also

#TYPE System.Diagnostics.Eventing.Reader.EventLogRecord
Message Id Version Qualifiers Level Task Opcode Keywords RecordId ProviderName ProviderId LogName ProcessId ThreadId MachineName UserId TimeCreated ActivityId RelatedActivityId ContainerLog MatchedQueryIds Bookmark LevelDisplayName OpcodeDisplayName TaskDisplayName KeywordsDisplayNames Properties
Failed to detach network endpoint from Container ‘70530a67adeabd1d5645ff155939f42f07efd13d076b726363d05d7ef3c75562’, network endpoint ID ‘{51CD4C25-670A-4B9D-96DB-4E02027A4860}’: A system shutdown is in progress. (0x8007045B). 12103 0 2 0 0 -9.22337E+18 3 Microsoft-Windows-Hyper-V-Compute 17103e3f-3c6e-4677-bb17-3b267eb5be57 Microsoft-Windows-Hyper-V-Compute-Admin 3860 6792 S-1-5-18 2/18/2019 6:46 146a0a95-333e-11e9-a811-fdc2a1ca7a87 microsoft-windows-hyper-v-compute-admin System.UInt32 System.Diagnostics.Eventing.Reader.EventBookmark Error Info System.Collections.ObjectModel.ReadOnlyCollection1[System.String]|System.Collections.Generic.List1[System.Diagnostics.Eventing.Reader.EventProperty]