Merge pull request #35102 from ripcurld0/doc_31926
Elaborate more about port allocation in docs
diff --git a/api/swagger.yaml b/api/swagger.yaml
index b0c0575..80319ae 100644
--- a/api/swagger.yaml
+++ b/api/swagger.yaml
@@ -722,7 +722,15 @@
description: "Gives the container full access to the host."
PublishAllPorts:
type: "boolean"
- description: "Allocates a random host port for all of a container's exposed ports."
+ description: |
+ Allocates an ephemeral host port for all of a container's
+ exposed ports.
+
+ Ports are de-allocated when the container stops and allocated when the container starts.
+ The allocated port might be changed when restarting the container.
+
+ The port is selected from the ephemeral port range that depends on the kernel.
+ For example, on Linux the range is defined by `/proc/sys/net/ipv4/ip_local_port_range`.
ReadonlyRootfs:
type: "boolean"
description: "Mount the container's root filesystem as read only."
diff --git a/docs/api/v1.18.md b/docs/api/v1.18.md
index 7ae32cc..3277014 100644
--- a/docs/api/v1.18.md
+++ b/docs/api/v1.18.md
@@ -264,8 +264,14 @@
should map to. A JSON object in the form
`{ <port>/<protocol>: [{ "HostPort": "<port>" }] }`
Take note that `port` is specified as a string and not an integer value.
- - **PublishAllPorts** - Allocates a random host port for all of a container's
+ - **PublishAllPorts** - Allocates an ephemeral host port for all of a container's
exposed ports. Specified as a boolean value.
+
+ Ports are de-allocated when the container stops and allocated when the container starts.
+ The allocated port might be changed when restarting the container.
+
+ The port is selected from the ephemeral port range that depends on the kernel.
+ For example, on Linux the range is defined by `/proc/sys/net/ipv4/ip_local_port_range`.
- **Privileged** - Gives the container full access to the host. Specified as
a boolean value.
- **ReadonlyRootfs** - Mount the container's root filesystem as read only.
diff --git a/docs/api/v1.19.md b/docs/api/v1.19.md
index 3ecd312..448fe83 100644
--- a/docs/api/v1.19.md
+++ b/docs/api/v1.19.md
@@ -274,8 +274,14 @@
should map to. A JSON object in the form
`{ <port>/<protocol>: [{ "HostPort": "<port>" }] }`
Take note that `port` is specified as a string and not an integer value.
- - **PublishAllPorts** - Allocates a random host port for all of a container's
+ - **PublishAllPorts** - Allocates an ephemeral host port for all of a container's
exposed ports. Specified as a boolean value.
+
+ Ports are de-allocated when the container stops and allocated when the container starts.
+ The allocated port might be changed when restarting the container.
+
+ The port is selected from the ephemeral port range that depends on the kernel.
+ For example, on Linux the range is defined by `/proc/sys/net/ipv4/ip_local_port_range`.
- **Privileged** - Gives the container full access to the host. Specified as
a boolean value.
- **ReadonlyRootfs** - Mount the container's root filesystem as read only.
diff --git a/docs/api/v1.20.md b/docs/api/v1.20.md
index 1f94bda..b971bab 100644
--- a/docs/api/v1.20.md
+++ b/docs/api/v1.20.md
@@ -277,8 +277,14 @@
should map to. A JSON object in the form
`{ <port>/<protocol>: [{ "HostPort": "<port>" }] }`
Take note that `port` is specified as a string and not an integer value.
- - **PublishAllPorts** - Allocates a random host port for all of a container's
+ - **PublishAllPorts** - Allocates an ephemeral host port for all of a container's
exposed ports. Specified as a boolean value.
+
+ Ports are de-allocated when the container stops and allocated when the container starts.
+ The allocated port might be changed when restarting the container.
+
+ The port is selected from the ephemeral port range that depends on the kernel.
+ For example, on Linux the range is defined by `/proc/sys/net/ipv4/ip_local_port_range`.
- **Privileged** - Gives the container full access to the host. Specified as
a boolean value.
- **ReadonlyRootfs** - Mount the container's root filesystem as read only.
diff --git a/docs/api/v1.21.md b/docs/api/v1.21.md
index a3b79ed..2971d25 100644
--- a/docs/api/v1.21.md
+++ b/docs/api/v1.21.md
@@ -294,8 +294,14 @@
should map to. A JSON object in the form
`{ <port>/<protocol>: [{ "HostPort": "<port>" }] }`
Take note that `port` is specified as a string and not an integer value.
- - **PublishAllPorts** - Allocates a random host port for all of a container's
+ - **PublishAllPorts** - Allocates an ephemeral host port for all of a container's
exposed ports. Specified as a boolean value.
+
+ Ports are de-allocated when the container stops and allocated when the container starts.
+ The allocated port might be changed when restarting the container.
+
+ The port is selected from the ephemeral port range that depends on the kernel.
+ For example, on Linux the range is defined by `/proc/sys/net/ipv4/ip_local_port_range`.
- **Privileged** - Gives the container full access to the host. Specified as
a boolean value.
- **ReadonlyRootfs** - Mount the container's root filesystem as read only.
diff --git a/docs/api/v1.22.md b/docs/api/v1.22.md
index a6027bb..a51fbcb 100644
--- a/docs/api/v1.22.md
+++ b/docs/api/v1.22.md
@@ -408,8 +408,14 @@
should map to. A JSON object in the form
`{ <port>/<protocol>: [{ "HostPort": "<port>" }] }`
Take note that `port` is specified as a string and not an integer value.
- - **PublishAllPorts** - Allocates a random host port for all of a container's
+ - **PublishAllPorts** - Allocates an ephemeral host port for all of a container's
exposed ports. Specified as a boolean value.
+
+ Ports are de-allocated when the container stops and allocated when the container starts.
+ The allocated port might be changed when restarting the container.
+
+ The port is selected from the ephemeral port range that depends on the kernel.
+ For example, on Linux the range is defined by `/proc/sys/net/ipv4/ip_local_port_range`.
- **Privileged** - Gives the container full access to the host. Specified as
a boolean value.
- **ReadonlyRootfs** - Mount the container's root filesystem as read only.
diff --git a/docs/api/v1.23.md b/docs/api/v1.23.md
index 19f9e5a..677dcab 100644
--- a/docs/api/v1.23.md
+++ b/docs/api/v1.23.md
@@ -432,8 +432,14 @@
should map to. A JSON object in the form
`{ <port>/<protocol>: [{ "HostPort": "<port>" }] }`
Take note that `port` is specified as a string and not an integer value.
- - **PublishAllPorts** - Allocates a random host port for all of a container's
+ - **PublishAllPorts** - Allocates an ephemeral host port for all of a container's
exposed ports. Specified as a boolean value.
+
+ Ports are de-allocated when the container stops and allocated when the container starts.
+ The allocated port might be changed when restarting the container.
+
+ The port is selected from the ephemeral port range that depends on the kernel.
+ For example, on Linux the range is defined by `/proc/sys/net/ipv4/ip_local_port_range`.
- **Privileged** - Gives the container full access to the host. Specified as
a boolean value.
- **ReadonlyRootfs** - Mount the container's root filesystem as read only.
diff --git a/docs/api/v1.24.md b/docs/api/v1.24.md
index 6ab5dc2..a32325e 100644
--- a/docs/api/v1.24.md
+++ b/docs/api/v1.24.md
@@ -469,8 +469,14 @@
should map to. A JSON object in the form
`{ <port>/<protocol>: [{ "HostPort": "<port>" }] }`
Take note that `port` is specified as a string and not an integer value.
- - **PublishAllPorts** - Allocates a random host port for all of a container's
+ - **PublishAllPorts** - Allocates an ephemeral host port for all of a container's
exposed ports. Specified as a boolean value.
+
+ Ports are de-allocated when the container stops and allocated when the container starts.
+ The allocated port might be changed when restarting the container.
+
+ The port is selected from the ephemeral port range that depends on the kernel.
+ For example, on Linux the range is defined by `/proc/sys/net/ipv4/ip_local_port_range`.
- **Privileged** - Gives the container full access to the host. Specified as
a boolean value.
- **ReadonlyRootfs** - Mount the container's root filesystem as read only.