summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorTomSweeneyRedHat <tsweeney@redhat.com>2020-08-18 17:05:29 -0400
committerTomSweeneyRedHat <tsweeney@redhat.com>2020-08-19 09:21:31 -0400
commit65b8bf795b22dac1c63bdb2e8878497bf74ce8a5 (patch)
treef87f89d9e2f5cbdf5335452a128393b6faf9ce3f /docs
parent7e2a1b34c30e085275de1c484dc472682876746c (diff)
downloadpodman-65b8bf795b22dac1c63bdb2e8878497bf74ce8a5.tar.gz
podman-65b8bf795b22dac1c63bdb2e8878497bf74ce8a5.tar.bz2
podman-65b8bf795b22dac1c63bdb2e8878497bf74ce8a5.zip
Note port publishing needs in pods for create/run
Add notes to the podman-create and podman-run man pages to note that ports do not need to be published and should not be, for containers that will be part of a pod. Addresses: #6769 Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/source/markdown/podman-create.1.md8
-rw-r--r--docs/source/markdown/podman-run.1.md8
2 files changed, 16 insertions, 0 deletions
diff --git a/docs/source/markdown/podman-create.1.md b/docs/source/markdown/podman-create.1.md
index 976a1e681..cbf51dd2e 100644
--- a/docs/source/markdown/podman-create.1.md
+++ b/docs/source/markdown/podman-create.1.md
@@ -648,6 +648,14 @@ Host port does not have to be specified (e.g. `podman run -p 127.0.0.1::80`).
If it is not, the container port will be randomly assigned a port on the host.
Use `podman port` to see the actual mapping: `podman port CONTAINER $CONTAINERPORT`
+**Note:** if a container will be run within a pod, it is not necessary to publish the port for
+the containers in the pod. The port must only be published by the pod itself. Pod network
+stacks act like the network stack on the host - you have a variety of containers in the pod,
+and programs in the container, all sharing a single interface and IP address, and
+associated ports. If one container binds to a port, no other container can use that port
+within the pod while it is in use. Containers in the pod can also communicate over localhost
+by having one container bind to localhost in the pod, and another connect to that port.
+
**--publish-all**, **-P**=*true|false*
Publish all exposed ports to random ports on the host interfaces. The default is *false*.
diff --git a/docs/source/markdown/podman-run.1.md b/docs/source/markdown/podman-run.1.md
index b6c1fab17..09df87b2b 100644
--- a/docs/source/markdown/podman-run.1.md
+++ b/docs/source/markdown/podman-run.1.md
@@ -662,6 +662,14 @@ If it is not, the container port will be randomly assigned a port on the host.
Use **podman port** to see the actual mapping: **podman port $CONTAINER $CONTAINERPORT**.
+**Note:** if a container will be run within a pod, it is not necessary to publish the port for
+the containers in the pod. The port must only be published by the pod itself. Pod network
+stacks act like the network stack on the host - you have a variety of containers in the pod,
+and programs in the container, all sharing a single interface and IP address, and
+associated ports. If one container binds to a port, no other container can use that port
+within the pod while it is in use. Containers in the pod can also communicate over localhost
+by having one container bind to localhost in the pod, and another connect to that port.
+
**--publish-all**, **-P**=**true**|**false**
Publish all exposed ports to random ports on the host interfaces. The default is **false**.