I've installed docker on a fresh ubuntu desktop 18.04 machine and I lost internet connection immediately after the installation finished. More specifically, I can ping 8.8.8.8 but I can't ping www.google.com.

The steps to reproduce the error are the following:

  1. Install ubuntu 18.04
  2. Install docker-ce using a local DNS server.

EDIT:

The most important difference between a clean install and my situation is that my machine is using a local DNS server, which has a fixed address at 172.17.100.3 and 172.17.100.70 in a corporate network.

From what I've read so far, either the problem comes from NetworkManager's attempt to manage the docker0 interface or something in the docker installation process breaks systemd resolve capabilities. Note that systemd-resolve uses 127.0.0.53 by default

So far I've attempted the following:

So far the only thing that works is hardcoding the google dns server address in resolv.conf, which is not a clean approach in my opinion. I also have to automate this process on startup, which is something I don't like.

How does one properly fix the NetworkingManager problem in a development machine that has docker?

Current environment

My default resolv.conf has

nameserver 127.0.0.53

and systemd-resolve --status returns (I've checked with a colleague and we have the same output)

GlobalDNSSEC NTA: 10.in-addr.arpa16.172.in-addr.arpa168.192.in-addr.arpa17.172.in-addr.arpa18.172.in-addr.arpa19.172.in-addr.arpa20.172.in-addr.arpa21.172.in-addr.arpa22.172.in-addr.arpa23.172.in-addr.arpa24.172.in-addr.arpa25.172.in-addr.arpa26.172.in-addr.arpa27.172.in-addr.arpa28.172.in-addr.arpa29.172.in-addr.arpa30.172.in-addr.arpa31.172.in-addr.arpacorpd.f.ip6.arpahomeinternalintranetlanlocalprivatetestLink 4 (docker0)Current Scopes: noneLLMNR setting: yesMulticastDNS setting: noDNSSEC setting: noDNSSEC supported: noLink 3 (eno1)Current Scopes: DNSLLMNR setting: yesMulticastDNS setting: noDNSSEC setting: noDNSSEC supported: noDNS Servers: 172.17.100.3172.17.100.70Link 2 (eno2)Current Scopes: noneLLMNR setting: yesMulticastDNS setting: noDNSSEC setting: noDNSSEC supported: no

ifconfig docker0

bluesmonk@laptop:/etc/NetworkManager$ ifconfig docker0docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255ether 02:42:86:e0:f0:94 txqueuelen 0 (Ethernet)RX packets 0 bytes 0 (0.0 B)RX errors 0 dropped 0 overruns 0 frame 0TX packets 0 bytes 0 (0.0 B)TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

and the status of the docker service

$ sudo service docker status● docker.service - Docker Application Container EngineLoaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)Active: active (running) since Tue 2018-07-03 10:17:35 -04; 4min 52s agoDocs: https://docs.docker.comMain PID: 14992 (dockerd)Tasks: 31CGroup: /system.slice/docker.service├─14992 /usr/bin/dockerd -H fd://└─15015 docker-containerd --config /var/run/docker/containerd/containerd.tomljul 03 10:17:32 laptop dockerd[14992]: time="2018-07-03T10:17:32.981563020-04:00" level=warning msg="Your kernel does not support swap memory limit"jul 03 10:17:32 laptop dockerd[14992]: time="2018-07-03T10:17:32.981595408-04:00" level=warning msg="Your kernel does not support cgroup rt period"jul 03 10:17:32 laptop dockerd[14992]: time="2018-07-03T10:17:32.981603807-04:00" level=warning msg="Your kernel does not support cgroup rt runtime"jul 03 10:17:32 laptop dockerd[14992]: time="2018-07-03T10:17:32.982040899-04:00" level=info msg="Loading containers: start."jul 03 10:17:34 laptop dockerd[14992]: time="2018-07-03T10:17:34.403909997-04:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be usedjul 03 10:17:35 laptop dockerd[14992]: time="2018-07-03T10:17:35.083366302-04:00" level=info msg="Loading containers: done."jul 03 10:17:35 laptop dockerd[14992]: time="2018-07-03T10:17:35.458766295-04:00" level=info msg="Docker daemon" commit=9ee9f40 graphdriver(s)=overlay2 version=18.03.1-cejul 03 10:17:35 laptop dockerd[14992]: time="2018-07-03T10:17:35.458857295-04:00" level=info msg="Daemon has completed initialization"jul 03 10:17:35 laptop dockerd[14992]: time="2018-07-03T10:17:35.470042819-04:00" level=info msg="API listen on /var/run/docker.sock"jul 03 10:17:35 laptop systemd[1]: Started Docker Application Container Engine.lines 1-20/20 (END)

Related to my machine

Client:Version: 18.03.1-ceAPI version: 1.37Go version: go1.9.5Git commit: 9ee9f40Built: Wed Jun 20 21:43:51 2018OS/Arch: linux/amd64Experimental: falseOrchestrator: swarmServer:Engine:Version: 18.03.1-ceAPI version: 1.37 (minimum version 1.12)Go version: go1.9.5Git commit: 9ee9f40Built: Wed Jun 20 21:42:00 2018OS/Arch: linux/amd64Experimental: false

docker info:

docker infoContainers: 1Running: 0Paused: 0Stopped: 1Images: 1Server Version: 18.03.1-ceStorage Driver: overlay2Backing Filesystem: extfsSupports d_type: trueNative Overlay Diff: trueLogging Driver: json-fileCgroup Driver: cgroupfsPlugins:Volume: localNetwork: bridge host macvlan null overlayLog: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslogSwarm: inactiveRuntimes: runcDefault Runtime: runcInit Binary: docker-initcontainerd version: 773c489c9c1b21a6d78b5c538cd395416ec50f88runc version: 4fc53a81fb7c994640722ac585fa9ca548971871init version: 949e6faSecurity Options:apparmorseccompProfile: defaultKernel Version: 4.15.0-23-genericOperating System: Ubuntu 18.04 LTSOSType: linuxArchitecture: x86_64CPUs: 4Total Memory: 31.38GiBName: bluesmonk-ubuntuID: FRUH:57KI:POWV:EAHH:CY6Y:J3UH:OWBH:AIYF:BONF:DH4Q:5Y2P:RZ6TDocker Root Dir: /var/lib/dockerDebug Mode (client): falseDebug Mode (server): falseRegistry: https://index.docker.io/v1/Labels:Experimental: falseInsecure Registries:127.0.0.0/8Live Restore Enabled: falseWARNING: No swap limit support

about the distro

$ cat /etc/*releaseDISTRIB_ID=UbuntuDISTRIB_RELEASE=18.04DISTRIB_CODENAME=bionicDISTRIB_DESCRIPTION="Ubuntu 18.04 LTS"NAME="Ubuntu"VERSION="18.04 LTS (Bionic Beaver)"ID=ubuntuID_LIKE=debianPRETTY_NAME="Ubuntu 18.04 LTS"VERSION_ID="18.04"HOME_URL="https://www.ubuntu.com/"SUPPORT_URL="https://help.ubuntu.com/"BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"VERSION_CODENAME=bionicUBUNTU_CODENAME=bionic

Probably related

Thanks!

ps: I've opened a qustion in the docker forums with the same info https://forums.docker.com/t/cant-access-internet-after-installing-docker-in-a-fresh-ubuntu-18-04-machine/53416

    Your Answer

     

    By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

    Browse other questions tagged or ask your own question.