summaryrefslogtreecommitdiff
path: root/docs/source
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-08-26 09:16:06 -0400
committerGitHub <noreply@github.com>2020-08-26 09:16:06 -0400
commit3a9d5248ac65358e7a4f123c2cdbe93584084d6a (patch)
treec20774d8cf355fdd6abdf3d2685780ba9d9c0d5d /docs/source
parent6a069446fbb23d7fd16ce14305fda1a7b2b8f925 (diff)
parent65b8bf795b22dac1c63bdb2e8878497bf74ce8a5 (diff)
downloadpodman-3a9d5248ac65358e7a4f123c2cdbe93584084d6a.tar.gz
podman-3a9d5248ac65358e7a4f123c2cdbe93584084d6a.tar.bz2
podman-3a9d5248ac65358e7a4f123c2cdbe93584084d6a.zip
Merge pull request #7364 from TomSweeneyRedHat/dev/tsweeney/exposeport
Note port publishing needs in pods for create/run
Diffstat (limited to 'docs/source')
-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 2b5e86637..2f59f8a09 100644
--- a/docs/source/markdown/podman-create.1.md
+++ b/docs/source/markdown/podman-create.1.md
@@ -652,6 +652,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 4449b53fc..c86090167 100644
--- a/docs/source/markdown/podman-run.1.md
+++ b/docs/source/markdown/podman-run.1.md
@@ -666,6 +666,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**.