Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow docker0 CIDR to be specified #22

merged 4 commits into from Apr 10, 2014


Copy link

@yacn yacn commented Feb 24, 2014

NOTE: This pull request depends on #21


Using dvm in an environment where the default network range for Docker ( 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.


  • To allow setting the CIDR range for the docker0 bridge, I've added the configuration directive DOCKER0_CIDR to dvm.conf.
  • To fix the issue of docker0 previously existing, the bridge-utils package is installed to provide brctl (I did check busybox first to make sure it was not already included), which is then used to remove the docker0 bridge before starting Docker with the new arguments.

Isaac Boehman added 4 commits Feb 24, 2014
 * bridge_utils needed to be installed
 * docker0 interface needed to be shutdown
 * docker0 interface needed to be deleted
 * args passed to docker needed to be updated
@fnichol fnichol merged commit 47922c8 into fnichol:master Apr 10, 2014
Copy link

fnichol commented Apr 10, 2014

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants