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

Adding custom bridge support to docker run #6704

Closed
wants to merge 6 commits into from

Conversation

vishh
Copy link
Contributor

@vishh vishh commented Jun 26, 2014

Docker will now accept a pre-existing bridge as an argument to docker run to create the networking stack on the user specified bridge instead of docker0.

Fixes issue #6155.

@vishh
Copy link
Contributor Author

vishh commented Jun 26, 2014

Ping @crosbymichael @vieux

@@ -888,7 +888,8 @@ removed before the image is removed.
-m, --memory="" Memory limit (format: <number><optional unit>, where unit = b, k, m or g)
--name="" Assign a name to the container
--net="bridge" Set the Network mode for the container
'bridge': creates a new network stack for the container on the docker bridge
'bridge': creates a new network stack for the container on the default docker bridge
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know in the generated docs, but the output looks weird (tabs/spaces)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@vishh
Copy link
Contributor Author

vishh commented Jun 27, 2014

Ping @vieux @crosbymichael

@crosbymichael
Copy link
Contributor

It looks like your script picked up some vendor changes on the formatting

vendor/src/github.com/coreos/go-systemd/dbus has changes

@vishh
Copy link
Contributor Author

vishh commented Jun 27, 2014

Sorry about that.. Fixed.

@crosbymichael
Copy link
Contributor

Do you think we should do anything around creating a bridge if it does not exist?

@vishh
Copy link
Contributor Author

vishh commented Jun 28, 2014

I want to eventually. We could something like --net "bridge:name:CIDR" which would instruct docker to create the bridge. I am not sure who needs that feature at this point though. WDYT?
Are you OK with this patch?

@tianon
Copy link
Member

tianon commented Jun 28, 2014

We talked about creation at the meeting and decided that it's easier to add
creation later than to take it away, especially since it makes the UI
slightly more complex.

@SvenDowideit
Copy link
Contributor

needs an update of docs/man/docker-run.1.md too - sorry, I we need to write some code to share those.

@vishh
Copy link
Contributor Author

vishh commented Jun 30, 2014

@SvenDowideit Has docs/man/docker-run.1.md been updated recently? I don't see '--net' option mentioned at all.

@vishh
Copy link
Contributor Author

vishh commented Jun 30, 2014

@crosbymichael @vieux do you guys have any other comments?

@vishh
Copy link
Contributor Author

vishh commented Jul 1, 2014

Ping @vieux

@vieux
Copy link
Contributor

vieux commented Jul 2, 2014

Sorry @vishh, we will take a look soon, I moved this into the 1.1.1 milestone.

@vieux vieux added this to the 1.1.1 milestone Jul 2, 2014
@fkautz
Copy link
Contributor

fkautz commented Jul 8, 2014

@vishh Looks like there are some conflicts, can you rebase this?

@SvenDowideit
Copy link
Contributor

@vishh yes, I see --net stuff at about line 176 in the man page - though I also see a bug in it :)

@vishh
Copy link
Contributor Author

vishh commented Jul 11, 2014

@SvenDowideit: I have updated docker-run.1.md.
@fkautz: Rebased
Ping @vieux @crosbymichael

vishh added 6 commits July 11, 2014 17:09
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
… docker run.

Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
@vieux vieux modified the milestones: 1.1.2, 1.1.1 Jul 11, 2014
@vishh
Copy link
Contributor Author

vishh commented Jul 16, 2014

Ping @vieux @crosbymichael

the other side of the pair will be placed inside the container's namespaces in
addition to the `loopback` interface. An IP address will be allocated for
containers on the bridge's network and trafic will be routed though this bridge
to the container.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you give an fully worked example for someone to follow in the networking.md article?

mind you Docs LGTM @jamtur01 @fredlf @ostezer

@fredlf
Copy link
Contributor

fredlf commented Jul 18, 2014

LGTM once my/ostezer's comment is a addressed.

@vishh
Copy link
Contributor Author

vishh commented Jul 18, 2014

There is an ongoing discussion on #docker-dev about handling custom
networking setups. This PR might change significantly depending on the
outcome of that discussion.

On Fri Jul 18 2014 at 10:43:11 AM, Fred Lifton notifications@github.com
wrote:

LGTM once my/ostezer's comment is a addressed.


Reply to this email directly or view it on GitHub
#6704 (comment).

@tristanz
Copy link

Is there any resolution to this from #docker-dev discussion?

@vishh
Copy link
Contributor Author

vishh commented Aug 12, 2014

Ping @erikh. Are you working on a generic solution for netowkr related
plugins?

On Tue, Aug 12, 2014 at 12:30 PM, Tristan Zajonc notifications@github.com
wrote:

Is there any resolution to this from #docker-dev discussion?


Reply to this email directly or view it on GitHub
#6704 (comment).

@erikh
Copy link
Contributor

erikh commented Aug 12, 2014

That’s coming later.

On Aug 12, 2014, at 12:31 PM, Vish Kannan notifications@github.com wrote:

Ping @erikh. Are you working on a generic solution for netowkr related
plugins?

On Tue, Aug 12, 2014 at 12:30 PM, Tristan Zajonc notifications@github.com
wrote:

Is there any resolution to this from #docker-dev discussion?


Reply to this email directly or view it on GitHub
#6704 (comment).


Reply to this email directly or view it on GitHub #6704 (comment).

@tristanz
Copy link

Just to list our use case here: we would like containers to be assigned to specific subnets in AWS VPC environment. This pull request seems like a nice simple solution, in line with --net option, that shouldn't be too disruptive to future plans. So +1 for this feature unless there's a clear alternative in the works that I'm unaware of.

@vieux vieux modified the milestones: 1.1.3, 1.3.0 Aug 22, 2014
@crosbymichael crosbymichael removed this from the 1.3.0 milestone Sep 23, 2014
@shykes
Copy link
Contributor

shykes commented Nov 1, 2014

Hi @vishh, this PR is causing the same concerns as described in #7436 (comment) . Bottom line, we strongly agree with the need for this feature, but want to implement a different way, using hooks/plugins. There are a whole bunch of people interested in helping with this, so we'll probably put together some sort of hackfest to get it done. Sorry for closing this, I hope you'll join the fun :)

@shykes shykes closed this Nov 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants