Adding support to publish on custom host port ranges

Signed-off-by: Don Kjer <don.kjer@gmail.com>

Changing vendor/src/github.com/docker/libnetwork to match lindenlab/libnetwork custom-host-port-ranges-1.7 branch
Upstream-commit: 47272f9cc563ea90d1f86df044f5429d15a37e4f
Component: engine
This commit is contained in:
Don Kjer
2015-05-01 19:35:26 +00:00
parent 6d118e9c38
commit 470c87b117
7 changed files with 192 additions and 8 deletions

View File

@ -50,6 +50,14 @@ container:
And you saw why this isn't such a great idea because it constrains you to
only one container on that specific port.
Instead, you may specify a range of host ports to bind a container port to
that is different than the default *ephemeral port range*:
$ docker run -d -p 8000-9000:5000 training/webapp python app.py
This would bind port 5000 in the container to a randomly available port
between 8000 and 9000 on the host.
There are also a few other ways you can configure the `-p` flag. By
default the `-p` flag will bind the specified port to all interfaces on
the host machine. But you can also specify a binding to a specific