2016-07-02 - docker daemon and networking

docker logo i recently had a problem with docker 1.8.x, on one of the machines. starting daemon caused the following error message:

Error starting daemon: Error initializing network controller: Error creating default "bridge" network: can't find an address range for interface "docker0"

it turns out docker has a problem with parsing network interfaces, when a lot of different routes were setup. in my case there are unusual names of the interfaces, VPN and some other custom routing to multiple networks.

it turned out that starting daemon with explicitly provided network range solved the problem. in /etc/default/docker one must add the following line, to make it work:

DOCKER_OPTS="--bip=172.17.42.1/16"

…which is the default, btw. ;)