From 68f8a90e3d3215df643372f3a96959e1d126830e Mon Sep 17 00:00:00 2001 From: Lei Jitang Date: Tue, 5 May 2015 19:27:07 +0800 Subject: [PATCH] Add support --net=container with --mac-address,--add-host error out Signed-off-by: Lei Jitang --- docs/sources/reference/run.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/sources/reference/run.md b/docs/sources/reference/run.md index bcbbe4a9a2..0145828024 100644 --- a/docs/sources/reference/run.md +++ b/docs/sources/reference/run.md @@ -282,7 +282,8 @@ With the networking mode set to `host` a container will share the host's network stack and all interfaces from the host will be available to the container. The container's hostname will match the hostname on the host system. Publishing ports and linking to other containers will not work -when sharing the host's network stack. +when sharing the host's network stack. Note that `--add-host` `--hostname` +`--dns` `--dns-search` and `--mac-address` is invalid in `host` netmode. Compared to the default `bridge` mode, the `host` mode gives *significantly* better networking performance since it uses the host's native networking stack @@ -298,7 +299,9 @@ or a High Performance Web Server. With the networking mode set to `container` a container will share the network stack of another container. The other container's name must be -provided in the format of `--net container:`. +provided in the format of `--net container:`. Note that `--add-host` +`--hostname` `--dns` `--dns-search` and `--mac-address` is invalid +in `container` netmode. Example running a Redis container with Redis binding to `localhost` then running the `redis-cli` command and connecting to the Redis server over the