From 74388fe75ffa896993256c5336dabaa071b034f9 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Mon, 22 Aug 2022 13:06:49 -0600 Subject: [PATCH] Man pages: refactor common options: --pod-id-file Much like --cidfile (#15414), --pod-id-file has two meanings. One is used in pod-related commands, one in container ones. Both meanings read the file, so the read/write split used in --cidfile is not applicable here. podman-pod-create keeps its --pod-id-file option because that one cannot be refactored: that's the only command (now) that writes a pod-id file. Reviewable using hack/markdown-preprocess-review but I did take some liberties with the #### args because they were wrong. And, since I had to much with the description text anyway (resulting in diffs), I also took the liberty of cleaning up a double space. Signed-off-by: Ed Santiago --- docs/source/markdown/.gitignore | 3 +++ docs/source/markdown/options/pod-id-file.container.md | 4 ++++ docs/source/markdown/options/pod-id-file.pod.md | 3 +++ docs/source/markdown/podman-create.1.md.in | 4 +--- .../markdown/{podman-pod-rm.1.md => podman-pod-rm.1.md.in} | 4 +--- .../{podman-pod-start.1.md => podman-pod-start.1.md.in} | 4 +--- .../{podman-pod-stop.1.md => podman-pod-stop.1.md.in} | 4 +--- docs/source/markdown/podman-run.1.md.in | 5 +---- 8 files changed, 15 insertions(+), 16 deletions(-) create mode 100644 docs/source/markdown/options/pod-id-file.container.md create mode 100644 docs/source/markdown/options/pod-id-file.pod.md rename docs/source/markdown/{podman-pod-rm.1.md => podman-pod-rm.1.md.in} (94%) rename docs/source/markdown/{podman-pod-start.1.md => podman-pod-start.1.md.in} (90%) rename docs/source/markdown/{podman-pod-stop.1.md => podman-pod-stop.1.md.in} (95%) diff --git a/docs/source/markdown/.gitignore b/docs/source/markdown/.gitignore index 5a30aab78f..2bdcce197e 100644 --- a/docs/source/markdown/.gitignore +++ b/docs/source/markdown/.gitignore @@ -13,6 +13,9 @@ podman-manifest-push.1.md podman-pause.1.md podman-pod-clone.1.md podman-pod-create.1.md +podman-pod-rm.1.md +podman-pod-start.1.md +podman-pod-stop.1.md podman-pull.1.md podman-push.1.md podman-rm.1.md diff --git a/docs/source/markdown/options/pod-id-file.container.md b/docs/source/markdown/options/pod-id-file.container.md new file mode 100644 index 0000000000..1c102dc6b9 --- /dev/null +++ b/docs/source/markdown/options/pod-id-file.container.md @@ -0,0 +1,4 @@ +#### **--pod-id-file**=*file* + +Run container in an existing pod and read the pod's ID from the specified *file*. +If a container is run within a pod, and the pod has an infra-container, the infra-container will be started before the container is. diff --git a/docs/source/markdown/options/pod-id-file.pod.md b/docs/source/markdown/options/pod-id-file.pod.md new file mode 100644 index 0000000000..69e2ac6e90 --- /dev/null +++ b/docs/source/markdown/options/pod-id-file.pod.md @@ -0,0 +1,3 @@ +#### **--pod-id-file**=*file* + +Read pod ID from the specified *file* and <> the pod. Can be specified multiple times. diff --git a/docs/source/markdown/podman-create.1.md.in b/docs/source/markdown/podman-create.1.md.in index 2827964f71..b943783cba 100644 --- a/docs/source/markdown/podman-create.1.md.in +++ b/docs/source/markdown/podman-create.1.md.in @@ -476,9 +476,7 @@ Default is to create a private PID namespace for the container Run container in an existing pod. If you want Podman to make the pod for you, preference the pod name with `new:`. To make a pod with more granular options, use the `podman pod create` command before creating a container. -#### **--pod-id-file**=*path* - -Run container in an existing pod and read the pod's ID from the specified file. If a container is run within a pod, and the pod has an infra-container, the infra-container will be started before the container is. +@@option pod-id-file.container #### **--privileged** diff --git a/docs/source/markdown/podman-pod-rm.1.md b/docs/source/markdown/podman-pod-rm.1.md.in similarity index 94% rename from docs/source/markdown/podman-pod-rm.1.md rename to docs/source/markdown/podman-pod-rm.1.md.in index befab6791a..54646ebe34 100644 --- a/docs/source/markdown/podman-pod-rm.1.md +++ b/docs/source/markdown/podman-pod-rm.1.md.in @@ -29,9 +29,7 @@ ExecStop directive of a systemd service referencing that pod. Instead of providing the pod name or ID, remove the last created pod. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines) -#### **--pod-id-file** - -Read pod ID from the specified file and remove the pod. Can be specified multiple times. +@@option pod-id-file.pod #### **--time**, **-t**=*seconds* diff --git a/docs/source/markdown/podman-pod-start.1.md b/docs/source/markdown/podman-pod-start.1.md.in similarity index 90% rename from docs/source/markdown/podman-pod-start.1.md rename to docs/source/markdown/podman-pod-start.1.md.in index 45fc50c514..6a47ce1b98 100644 --- a/docs/source/markdown/podman-pod-start.1.md +++ b/docs/source/markdown/podman-pod-start.1.md.in @@ -20,9 +20,7 @@ Starts all pods Instead of providing the pod name or ID, start the last created pod. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines) -#### **--pod-id-file** - -Read pod ID from the specified file and start the pod. Can be specified multiple times. +@@option pod-id-file.pod ## EXAMPLE diff --git a/docs/source/markdown/podman-pod-stop.1.md b/docs/source/markdown/podman-pod-stop.1.md.in similarity index 95% rename from docs/source/markdown/podman-pod-stop.1.md rename to docs/source/markdown/podman-pod-stop.1.md.in index bded0ba7d1..879645cd96 100644 --- a/docs/source/markdown/podman-pod-stop.1.md +++ b/docs/source/markdown/podman-pod-stop.1.md.in @@ -25,9 +25,7 @@ ExecStop directive of a systemd service referencing that pod. Instead of providing the pod name or ID, stop the last created pod. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines) -#### **--pod-id-file** - -Read pod ID from the specified file and stop the pod. Can be specified multiple times. +@@option pod-id-file.pod #### **--time**, **-t**=*seconds* diff --git a/docs/source/markdown/podman-run.1.md.in b/docs/source/markdown/podman-run.1.md.in index cdfa9366ad..077ad7a4ad 100644 --- a/docs/source/markdown/podman-run.1.md.in +++ b/docs/source/markdown/podman-run.1.md.in @@ -496,10 +496,7 @@ Run container in an existing pod. If you want Podman to make the pod for you, pr To make a pod with more granular options, use the **podman pod create** command before creating a container. If a container is run with a pod, and the pod has an infra-container, the infra-container will be started before the container is. -#### **--pod-id-file**=*path* - -Run container in an existing pod and read the pod's ID from the specified file. -If a container is run within a pod, and the pod has an infra-container, the infra-container will be started before the container is. +@@option pod-id-file.container #### **--preserve-fds**=*N*