1
0
mirror of https://github.com/docker/cli.git synced 2026-01-22 03:22:01 +03:00

Adding docker-cli run param to set MAC address

Signed-off-by: Malte Janduda <mail@janduda.net>
Upstream-commit: ad1a9d8d2f
Component: cli
This commit is contained in:
Malte Janduda
2014-10-03 23:02:17 +02:00
committed by Tibor Vass
parent 2c48eb8298
commit 93b94d46f6
2 changed files with 20 additions and 7 deletions

View File

@@ -536,6 +536,7 @@ Creates a new container.
--lxc-conf=[] (lxc exec-driver only) Add custom lxc options --lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"
-m, --memory="" Memory limit (format: <number><optional unit>, where unit = b, k, m or g)
--name="" Assign a name to the container
--mac-address="" Set the container's MAC address
--net="bridge" Set the Network mode for the container
'bridge': creates a new network stack for the container on the docker bridge
'none': no networking for this container
@@ -887,6 +888,13 @@ straightforward manner.
$ sudo docker inspect --format='{{.NetworkSettings.IPAddress}}' $INSTANCE_ID
**Get an instance's MAC Address:**
For the most part, you can pick out any field from the JSON in a fairly
straightforward manner.
$ sudo docker inspect --format='{{.NetworkSettings.MacAddress}}' $INSTANCE_ID
**List All Port Bindings:**
One can loop over arrays and maps in the results to produce simple text

View File

@@ -133,13 +133,14 @@ example, `docker run ubuntu:14.04`.
## Network settings
--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
'none': no networking for this container
'container:<name|id>': reuses another container network stack
'host': use the host network stack inside the container
--add-host="" : Add a line to /etc/hosts (host:IP)
--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
'none': no networking for this container
'container:<name|id>': reuses another container network stack
'host': use the host network stack inside the container
--add-host="" : Add a line to /etc/hosts (host:IP)
--mac-address="" : Sets the container's ethernet device's mac address
By default, all containers have networking enabled and they can make any
outgoing connections. The operator can completely disable networking
@@ -150,6 +151,10 @@ networking. In cases like this, you would perform I/O through files or
Your container will use the same DNS servers as the host by default, but
you can override this with `--dns`.
By default a random mac is generated. You can set the container's mac address
explicitly by providing a mac via the `--mac-address` parameter (format:
12:34:56:78:9a:bc).
Supported networking modes are:
* none - no networking in the container