How to cleanly setup the network Docker in Ubuntu Gnome 15.10

TL;DR: I had installed Docker using "apt-get install docker.io". Installing the latest version following https://docs.docker.com/installation/ubuntulinux/ fixes the issue.

After investigating the problem it appears that the version of Docker in 15.10 cannot both create and initialize the docker0 interface correctly. On the first run (service docker start) it will create the interface but fail to initialize it, and on the subsequent run (service docker restart) it will initialize it. This can be reproduced consistently adding and deleting the interface manually with brctl. This bug has been fixed in the latest Docker.


To me it's NetworkManager that messes up. Docker service creates bridge as it should then exposes it on dbus. NetworkManager kicks in seeing new interface on dbus and try to configure it (since it's stupid enough to know that bridge docker0 is already configured fine). NetworkManager sometimes succeeds configuring (re-configuring) docker0 but sometimes it will fail. So sometimes you reboot box and docker0 will have IP assigned, other times it will not.

To stop NetworkManager messing up add

iface docker0 inet manual

to /etc/network/interfaces assuming NetworkManager.conf has

[ifupdown] managed=false

which is default on 15.10

(bug should probably be raised to stop NetworkManager from messing up docker specific interfaces)