summaryrefslogtreecommitdiff
path: root/docs/source/markdown/podman-pod-create.1.md
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-06-02 10:48:18 -0400
committerGitHub <noreply@github.com>2022-06-02 10:48:18 -0400
commit570c2492a3cc596e0ac4e2cc208d1fe26166e016 (patch)
tree88e90de0732398d970355b732d7d269556f094f7 /docs/source/markdown/podman-pod-create.1.md
parent13cdf862e6dbf31902405e4204a5bd87f62a9759 (diff)
parent5b9729c479fc8a4452edea126f81c90d9f1808b4 (diff)
downloadpodman-570c2492a3cc596e0ac4e2cc208d1fe26166e016.tar.gz
podman-570c2492a3cc596e0ac4e2cc208d1fe26166e016.tar.bz2
podman-570c2492a3cc596e0ac4e2cc208d1fe26166e016.zip
Merge pull request #14451 from PhrozenByte/bugfix/docs-publish
[CI:DOCS] Document protocol usage for --publish
Diffstat (limited to 'docs/source/markdown/podman-pod-create.1.md')
-rw-r--r--docs/source/markdown/podman-pod-create.1.md26
1 files changed, 20 insertions, 6 deletions
diff --git a/docs/source/markdown/podman-pod-create.1.md b/docs/source/markdown/podman-pod-create.1.md
index cf749efda..1a98528bb 100644
--- a/docs/source/markdown/podman-pod-create.1.md
+++ b/docs/source/markdown/podman-pod-create.1.md
@@ -227,16 +227,30 @@ Set the PID mode for the pod. The default is to create a private PID namespace f
Write the pod ID to the file.
-#### **--publish**=*port*, **-p**
+#### **--publish**, **-p**=[[_ip_:][_hostPort_]:]_containerPort_[/_protocol_]
-Publish a port or range of ports from the pod to the host.
+Publish a container's port, or range of ports, within this pod to the host.
-Format: `ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort | containerPort`
Both hostPort and containerPort can be specified as a range of ports.
-When specifying ranges for both, the number of container ports in the range must match the number of host ports in the range.
-Use `podman port` to see the actual mapping: `podman port CONTAINER $CONTAINERPORT`.
+When specifying ranges for both, the number of container ports in the
+range must match the number of host ports in the range.
-NOTE: This cannot be modified once the pod is created.
+If host IP is set to 0.0.0.0 or not set at all, the port will be bound on all IPs on the host.
+
+By default, Podman will publish TCP ports. To publish a UDP port instead, give
+`udp` as protocol. To publish both TCP and UDP ports, set `--publish` twice,
+with `tcp`, and `udp` as protocols respectively. Rootful containers can also
+publish ports using the `sctp` protocol.
+
+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:** You must not publish ports of containers in the pod individually,
+but only by the pod itself.
+
+**Note:** This cannot be modified once the pod is created.
#### **--replace**