Discussion:
Can not get -bip to work
(too old to reply)
Lars-Erik Helander
2014-01-13 18:52:09 UTC
Permalink
I am trying to assign a specific ip network to be used for containers using
the -bip option when starting the docker daemon.
The docker program (version 0.7.3) do not assign containers with ipadresses
from the network specified via the bip command.
Could anyone provide a working example where the bip option is used?

/Lars
Jérôme Petazzoni
2014-01-16 22:55:03 UTC
Permalink
Hi,

What's the exact command-line that you're using, what does your network
setup look like, and what's the exact command that you use to start your
test container?

Thank you!
Post by Lars-Erik Helander
I am trying to assign a specific ip network to be used for containers
using the -bip option when starting the docker daemon.
The docker program (version 0.7.3) do not assign containers with
ipadresses from the network specified via the bip command.
Could anyone provide a working example where the bip option is used?
/Lars
--
@jpetazzo <https://twitter.com/jpetazzo>
Latest blog post: http://jpetazzo.github.io/2013/12/07/pxe-netboot-docker/
Lars-Erik Helander
2014-01-17 00:13:08 UTC
Permalink
I have tried various ways to start the docker daemon:

docker -d -bip=192.168.55.0/24
docker -d -bip=192.168.55.0
docker -d -bip="192.168.55.0/24"
docker -d -bip="192.168.55.0"

My host has one physical ethernet port, assigned to 192.168.1.98. There are a number of other (non-docker) host on the 192.168.1.0 network.

My test container is started using

docker run -t -i busybox /bin/sh

/Lars
Jérôme Petazzoni
2014-03-01 02:54:36 UTC
Permalink
Hi,

Sorry for the late answer, but then again, someone might hit this problem
as well...
If the docker0 bridge already exists, the -bip option has no effect.
Try to:
- shutdown Docker
- destroy docker0 ("ip link del docker0")
- restart Docker ("docker -d -bip=192.168.55.1/24")

Note that you should specify a netmask, and you shouldn't specify the
network address.

HTH,
Post by Lars-Erik Helander
docker -d -bip=192.168.55.0/24
docker -d -bip=192.168.55.0
docker -d -bip="192.168.55.0/24"
docker -d -bip="192.168.55.0"
My host has one physical ethernet port, assigned to 192.168.1.98. There
are a number of other (non-docker) host on the 192.168.1.0 network.
My test container is started using
docker run -t -i busybox /bin/sh
/Lars
--
@jpetazzo <https://twitter.com/jpetazzo>
Latest blog post:
http://jpetazzo.github.io/2014/01/29/docker-device-mapper-resize/
Loading...