Scala notes

Fix docker connectivity problem



Docker images aparently have no connectivity. Issue resides with the dns resolvers.
Looks like when using ips, everything works; when using names, it doesn't work.

Two ways of doing this...

Option #1: disable dnsmasq

Edit the file: /etc/NetworkManager/NetworkManager.conf

Comment the line containing dns=dnsmasq.

Restart networking: sudo systemctl restart network-manager

Restart docker: sudo systemctl restart docker

Option #2: set the ip of the docker bridge with systemd

On elementary loki (ubuntu 16.04), docker configuration file is here: /lib/systemd/system/docker.service

Edit this config file and add to ExecStart like this: ExecStart=/usr/bin/docker daemon -H fd:// --bip=

Run: sudo systemctl daemon-reload

Stop docker service: systemctl stop docker

Install brctl to control the bridge: sudo apt-get install bridge-utils

Bring down the bridge: sudo ip link set docker0 down

Delete the bridge: sudo brctl delbr docker0

Restart docker: systemctl start docker

Option #2 did not work for me. Option #1 did.

Source and more details: