fnichol / dvm

An on demand Docker virtual machine, thanks to Vagrant and boot2docker. Works great on Macs and other platforms that don't natively support the Docker daemon. Support VirtualBox, VMware, and Parallels.
http://fnichol.github.io/dvm
Apache License 2.0
457 stars 67 forks source link

Allow docker0 CIDR to be specified #22

Closed yacn closed 10 years ago

yacn commented 10 years ago

NOTE: This pull request depends on #21

Problem

Using dvm in an environment where the default network range for Docker (172.16.42.1/24) conflicts with the local network, containers are unable to reach any hosts on the local network.

Docker allows passing in the --bip="" option to set the CIDR range for the docker0 bridge it creates. However, this alone is not enough. Since Docker will have already been started once, the docker0 bridge will already exist with the conflicting network range, causing the --bip option to take no effect.

Solution

fnichol commented 10 years ago

Nicely done, a hairy setup but as clean as possible, given the circumstances :smile: