$ sudo service docker stop
$ sudo brctl addbr cookbook
$ sudo ip link set cookbook up
$ sudo ip addr add 10.0.0.1/24 dev cookbook
Now that the bridge is up we can edit the Docker daemon configuration file and
restart the daemon (e.g on Ubuntu).
$ sudo su
# echo 'DOCKER_OPTS="-b=cookbook"' >> /etc/default/docker
# service docker restart
转载于:https://blog.51cto.com/1074963/1883542