Merge pull request #13502 from coolljt0725/conflict_port_and_netmode

Add --net=container with --publish --expose --publish-all error out
Upstream-commit: 637023a5f8d8347a0e271c09d5c9bc84fbc97693
Component: engine
This commit is contained in:
Sebastiaan van Stijn
2015-06-15 16:25:59 +02:00
3 changed files with 38 additions and 1 deletions
@@ -319,7 +319,8 @@ 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:<name|id>`. Note that `--add-host`
`--hostname` `--dns` `--dns-search` and `--mac-address` is invalid
in `container` netmode.
in `container` netmode, and `--publish` `--publish-all` `--expose` are also
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