Docker Community Forums

Share and learn in the Docker community.

No internet access from Windows container


(Mark Snelling) #1

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?

(Michael Friis) #2

Could you try running the Windows diagnostics scripts?

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

(Mark Snelling) #3

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.

(Mark Snelling) #4

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

(Barfittc) #5

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

(Meodep) #6

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.

(Lucasfmarconi) #7

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

(Sachin Chavan) #8

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

(Sebastianferrari) #9

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.