No external network connectivity from inside Docker container

Expected behavior

Docker container needs to be able to access the outside world for pulling down base images and/or any other external dependencies.

Actual behavior

Can’t access anything external.

Information

This was originally reported here. I tried changing the virtual switch from private to external but that breaks connectivity so no docker commands work.

Steps to reproduce the behavior

C:\Windows\system32>docker run hello-world
Unable to find image 'hello-world:latest' locally
Pulling repository docker.io/library/hello-world
docker: Network timed out while trying to connect to https://index.docker.io/v1/repositories/library/hello-world/images. You may want to check your internet connection or if you are behind a proxy..

Anyone have any ideas here?

Sorry about the lack of response. We haven’t been able to reproduce the problem, but we haven’t forgotten you. Any additional detail you might have on your system would be great.

I saw this happening on my local machine and discovered the root cause was custom DNS servers configured on my networking device. I had Acrylic DNS enabled which has instructions on how to configure / de-configure your networking device.

1 Like

Ok, after I rebuilt my machine (for other reasons), it appears to be working now. I was able to run the docker run hello-world sample and build one of my images which uses an external base. However, I should mention that I’m at home and one of your thoughts was that our (admittedly restrictive) firewall at work could’ve been to blame. I’ll give it a go when I’m in the office tomorrow and see what happens.

@taschmidt thanks for sticking with us - let us know how it goes.

Hi,
I run into very similar issue. I could not docker pull/search, but DNS was working correctly. I tried reinstalling docker which did not help. During my experiments I got the feeling, that docker was insisting on using ethernet interface, which is connected nowhere (I’m using only wifi). In the end, the following procedure helped:
I uninstalled docker
I uninstalled Hyper-v
Restarted
I went to BIOS, disabled my Wifi card (also removed other connections, like company VPN)
Restarted
Installed docker, everything works correctly including pull/search
Restarted and enabled Wifi in BIOS
Things seem to still work even when I connect only thru Wifi

The important part is - It does not help to disable Wifi after the problem arises, it also does not seem to help to disable the card in BIOS after the problem arises. To me It seems that the breaking thing is that during installation of docker (and possibly hyper-v), the ethernet interface must be connected (and possibly it must be the only connected interface?). Once docker is installed, it does not care about what connection is available in the system.

Hope this helps someone.

Hello, i have exactly the same issues.

I’m on Thinkpad Laptop, with ethernet and wifi.

Currently i’m disabling my ethernet card via BIOS to make docker works.
Probably issues with docker-proxy when multiple interface present.

I resolved the problem by adding an additional network to the docker hyper-v machine with a virutal switch type of “External” this way the hyper-v docker machine also gets an ip adres wich it can communicate with the outsite world (and therefor download images)

Ok has any some Ideas all you workarounds are not working for me im behind a coporate firewall, proxy are set i have i tried all of you ideas…

Error response from daemon: Get https://index.docker.io/v1/search?q=ubuntu: dial tcp: lookup index.docker.io on 10.0.75.1:53: read udp 10.0.75.2:55789->10.0.75.1:53: i/o timeout

I solved this by turning off VPN compatibility mode.

Update: With 1.11.2-beta15, the VPN compatibility mode option is gone, and I once again cannot connect to the internet from within Docker :frowning:

1 Like

I have been experiencing this issue, too. I added an external network switch via the Hyper-V manager for this VM and that still did not work for me. I did some digging on the Microsoft tech site and I really don’t know how this would get outside of the host machine:

Internal virtual networks. Use this type
when you want to allow communication between virtual machines on the
same virtualization server and between virtual machines and the
management operating system. This type of virtual network is commonly
used to build a test environment in which you need to connect to the
virtual machines from the management operating system. An internal
virtual network is not bound to a physical network adapter. As a result,
an internal virtual network is isolated from all external network
traffic.

So it seems to me that internal networks don’t get outside at all. An “internal network” is the only network that the Docker VM gets assigned when it is created.

I’ve had a similar issue. For example:

On the MobyLinux VM created in Hyper-V, I actually can see the outside world (after I configured the DockerNAT virtual switch created by the installer to actually do NAT). Running a command like docker login directly on the VM doesn’t help either.

(I had more snapshots to post, but new users are limited to one. Sorry. :frowning:)

I’m on version 1.12.0-rc2-beta16 (build: 4760) 999af1e on Windows 10 build 10586 (x64).

I set my DNS manually to “Fixed” at 8.8.8.8 within the Docker for Windows Network Settings menu. That fixed it for me.

I’m on DFW 1.12.0-rc2-beta16 (build:4760)

The DockerNAT switch is named so historically. It used to provide external connectivity, but now it’s just used for host local communication and the main network connectivity for containers is done via VPNKit

I don’t think we’re talking about the containers really - even the docker daemon cannot connect to network resources.

I was getting a similar error:

C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: Get https://b.gcr.io/v1/_ping: dial
 tcp: lookup b.gcr.io on 192.168.65.1:53: read udp 192.168.65.2:33251->192.168.65.1:53: i/o timeout.

Changing my “DNS Server” to “fixed: 8.8.8.8”, in the network tab of docker settings is working for me so far.

Client:
Version: 1.12.0-rc2
Server:
Version: 1.12.0-rc2

I’m still having a problem, in my Network Connections window I do see that the vEthernet (DockerNAT) is listed as ‘Unidentified network’. Not sure if that is ok?

Also I’m not having any network access for ipv4.

I updated to 1.12.0-rc3-beta18 (build 5193), did a factory reset and all is working now!

I was having this problem, and I was just poking around to see if I could fix it and the only thing I could get to work was to disable “expose container ports on localhost”. I did that and completely deleted the VM and restarted docker and now things are behaving as expected.