1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/docs/userguide/networking/default_network/options.md
Mary Anthony 9ef855f9e5 First pass at consolidating
Removing old networking.md
Updating dockernetworks.md with images
Adding information on network plugins
Adding blurb about links to docker networking
Updating the working documentation
Adding Overlay Getting Started
Downplaying links by removing refs/examples, adding refs/examples for network.
Updating getting started to reflect networks not links
Pulling out old network material
Updating per discussion with Madhu to add Default docs section
Updating with bridge default
Fix bad merge
Updating with new cluster-advertise behavior
Update working and NetworkSettings examples
Correcting example for default bridge discovery behavior
Entering comments
Fixing broken Markdown Syntax
Updating with comments
Updating all the links

Signed-off-by: Mary Anthony <mary@docker.com>
2015-11-02 21:14:55 -08:00

3.6 KiB

Quick guide to the options

Here is a quick list of the networking-related Docker command-line options, in case it helps you find the section below that you are looking for.

Some networking command-line options can only be supplied to the Docker server when it starts up, and cannot be changed once it is running:

There are three networking options that can be supplied either at startup or when docker run is invoked. When provided at startup, set the default value that docker run will later use if the options are not specified:

Finally, several networking options can only be provided when calling docker run because they specify something specific to one container:

To supply networking options to the Docker server at startup, use the DOCKER_OPTS variable in the Docker upstart configuration file. For Ubuntu, edit the variable in /etc/default/docker or /etc/sysconfig/docker for CentOS.

The following example illustrates how to configure Docker on Ubuntu to recognize a newly built bridge.

Edit the /etc/default/docker file:

$ echo 'DOCKER_OPTS="-b=bridge0"' >> /etc/default/docker

Then restart the Docker server.

$ sudo service docker start

For additional information on bridges, see building your own bridge later on this page.