First, stop the daemon:
sudo service docker stopEdit /etc/default/docker and add a line like this:
DOCKER_OPTS="--bip=192.168.1.1/24"Then bring the interface down:
sudo ip link set docker0 downThen delete the bridge:
sudo brctl delbr docker0Then restart the service:
sudo service docker startIf you don't delete the bridge docker will fail to start. But it won't write anything to the logs. If you run it interactively you'll see the problem:
$ sudo docker -d --bip=192.168.1.1/24 INFO[0000] Listening for HTTP on unix (/var/run/docker.sock) INFO[0000] [graphdriver] using prior storage driver "aufs" WARN[0000] Running modprobe bridge nf_nat failed with message: , error: exit status 1 FATA[0000] Error starting daemon: Error initializing network controller: Error creating default "bridge" network: bridge IPv4 (10.0.42.1) does not match requested configuration 192.168.1.1
No comments:
Post a Comment