Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker container can't connect to internet #14200

Closed
ericsagnes opened this issue Mar 25, 2016 · 3 comments
Closed

Docker container can't connect to internet #14200

ericsagnes opened this issue Mar 25, 2016 · 3 comments

Comments

@ericsagnes
Copy link
Contributor

Basic info

To make sure that we are on the same page:

  • Kernel: Linux alpha 4.4.4 #1-NixOS SMP Thu Mar 3 23:10:04 UTC 2016 x86_64 GNU/Linux
  • System: 16.09pre78286.0bf8a1a (Emu)
  • Nix version: nix-env (Nix) 1.11.2
  • Nixpkgs version: 16.09pre78286.0bf8a1a

Describe your issue here

Docker containers can't connect to internet.

$ ping google.com -c1
PING google.com (216.58.220.206) 56(84) bytes of data.
64 bytes from nrt13s36-in-f14.1e100.net (216.58.220.206): icmp_seq=1 ttl=49 time=55.2 ms

$ docker run -ti ubuntu ping google.com -c1
ping: unknown host google.com

It seems it has something to do with the DNS used by docker. (8.8.8.8 and 8.8.4.4)

Step to reproduce

  1. enable docker in configuration.nix

    virtualisation.docker.enable = true;
    
  2. run ping from a container

    $ docker run -ti ubuntu ping google.com -c1
    

cc docker maintainers @offlinehacker @tailhook

@jgillich
Copy link
Member

Probably a duplicate of #11478; TLDR: systemctl restart docker.

@ericsagnes
Copy link
Contributor Author

@jgillich Thanks!
Setting virtualisation.docker.socketActivation = false; and restarting docker unit solved the problem.

@stevenroose
Copy link
Contributor

What's the fix for this now that socketActivation doesn't exist anymore?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants