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
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updating the docs to reflect the newly added custom bridge support in…
… docker run.

Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
  • Loading branch information
vishh committed Jul 11, 2014
commit c8f413b5267091af67e0dfb360bc9058ebaab191
3 changes: 2 additions & 1 deletion docs/sources/reference/commandline/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,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.

'bridge:<name>': creates a new network stack for the container on the specified pre-existing bridge
'none': no networking for this container
'container:<name|id>': reuses another container network stack
'host': use the host network stack inside the container. Note: the host mode gives the container full access to local system services such as D-bus and is therefore considered insecure.
Expand Down
13 changes: 12 additions & 1 deletion docs/sources/reference/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ PID files):

--dns=[] : Set custom dns servers for 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.

The tabs were weird to begin with. I have changed them a bit.

'bridge:<name>': creates a new network stack for the container on the specified pre-existing bridge
'none': no networking for this container
'container:<name|id>': reuses another container network stack
'host': use the host network stack inside the container
Expand Down Expand Up @@ -170,6 +171,16 @@ container's namespaces in addition to the `loopback` interface. An IP
address will be allocated for containers on the bridge's network and
traffic will be routed though this bridge to the container.

#### Mode: bridge:<name>
With the networking mode set to `bridge:<name>` a container will use a
pre-existing bridge referred to by `name` for its networking setup.
A pair of veth interfaces will be created in bridge `name` for the container.
Copy link

Choose a reason for hiding this comment

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

should this be vEth instead of veth, or even "virtual ethernet (vEth)" for example?

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed, I think "virtual ethernet (vEth)" is clearest.

One side of the veth pair will remain on the host attached to the bridge while
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


#### Mode: host

With the networking mode set to `host` a container will share the host's
Expand Down