From edf755a3af3679d82bf28a95ab3c5234c3b883e8 Mon Sep 17 00:00:00 2001 From: Michal Minar Date: Wed, 21 Jan 2015 13:40:59 +0100 Subject: [PATCH] Use system's ephemeral port range for port allocation Read `/proc/sys/net/ipv4/ip_local_port_range` kernel parameter to obtain ephemeral port range that now sets the boundaries of port allocator which finds free host ports for those exported by containers. Signed-off-by: Michal Minar Upstream-commit: 6098d0f443190e2a3cfe7b29089e59f668ec5187 Component: cli --- components/cli/docs/sources/reference/run.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/components/cli/docs/sources/reference/run.md b/components/cli/docs/sources/reference/run.md index f06ca968ea..7529b848ea 100644 --- a/components/cli/docs/sources/reference/run.md +++ b/components/cli/docs/sources/reference/run.md @@ -651,10 +651,11 @@ developer, the operator has three choices: start the server container with `-P` or `-p,` or start the client container with `--link`. If the operator uses `-P` or `-p` then Docker will make the exposed port -accessible on the host and the ports will be available to any client -that can reach the host. When using `-P`, Docker will bind the exposed -ports to a random port on the host between 49153 and 65535. To find the -mapping between the host ports and the exposed ports, use `docker port`. +accessible on the host and the ports will be available to any client that can +reach the host. When using `-P`, Docker will bind the exposed port to a random +port on the host within an *ephemeral port range* defined by +`/proc/sys/net/ipv4/ip_local_port_range`. To find the mapping between the host +ports and the exposed ports, use `docker port`. If the operator uses `--link` when starting the new client container, then the client container can access the exposed port via a private