From 51c3578415477df87ce531c43d4eca3a3013a230 Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Tue, 4 Oct 2022 11:34:38 -0600 Subject: Man pages: refactor common options: --time Only in container/pod stop/rm/restart man pages; the others (volume-rm, network-rm, system-service) are too different to refactor. Mostly an easy one, no manual reconciliation needed apart from the pod-vs-container difference. Signed-off-by: Ed Santiago --- docs/source/markdown/.gitignore | 1 + docs/source/markdown/options/time.md | 3 + docs/source/markdown/podman-pod-rm.1.md.in | 4 +- docs/source/markdown/podman-pod-stop.1.md.in | 4 +- docs/source/markdown/podman-restart.1.md | 104 --------------------------- docs/source/markdown/podman-restart.1.md.in | 102 ++++++++++++++++++++++++++ docs/source/markdown/podman-rm.1.md.in | 4 +- docs/source/markdown/podman-stop.1.md.in | 4 +- 8 files changed, 112 insertions(+), 114 deletions(-) create mode 100644 docs/source/markdown/options/time.md delete mode 100644 docs/source/markdown/podman-restart.1.md create mode 100644 docs/source/markdown/podman-restart.1.md.in (limited to 'docs/source/markdown') diff --git a/docs/source/markdown/.gitignore b/docs/source/markdown/.gitignore index f5c4c2e24..584e88e75 100644 --- a/docs/source/markdown/.gitignore +++ b/docs/source/markdown/.gitignore @@ -26,6 +26,7 @@ podman-pod-stats.1.md podman-pod-stop.1.md podman-pull.1.md podman-push.1.md +podman-restart.1.md podman-rm.1.md podman-run.1.md podman-search.1.md diff --git a/docs/source/markdown/options/time.md b/docs/source/markdown/options/time.md new file mode 100644 index 000000000..85d571d18 --- /dev/null +++ b/docs/source/markdown/options/time.md @@ -0,0 +1,3 @@ +#### **--time**, **-t**=*seconds* + +Seconds to wait before forcibly stopping <>. diff --git a/docs/source/markdown/podman-pod-rm.1.md.in b/docs/source/markdown/podman-pod-rm.1.md.in index 5d708b65c..abfa97f5b 100644 --- a/docs/source/markdown/podman-pod-rm.1.md.in +++ b/docs/source/markdown/podman-pod-rm.1.md.in @@ -27,9 +27,9 @@ Instead of providing the pod name or ID, remove the last created pod. (This opti @@option pod-id-file.pod -#### **--time**, **-t**=*seconds* +@@option time -Seconds to wait before forcibly stopping running containers within the pod. The --force option must be specified to use the --time option. +The --force option must be specified to use the --time option. ## EXAMPLE diff --git a/docs/source/markdown/podman-pod-stop.1.md.in b/docs/source/markdown/podman-pod-stop.1.md.in index 575a5fa30..e6ffa4f76 100644 --- a/docs/source/markdown/podman-pod-stop.1.md.in +++ b/docs/source/markdown/podman-pod-stop.1.md.in @@ -23,9 +23,7 @@ Instead of providing the pod name or ID, stop the last created pod. (This option @@option pod-id-file.pod -#### **--time**, **-t**=*seconds* - -Seconds to wait before forcibly stopping the containers in the pod. +@@option time ## EXAMPLE diff --git a/docs/source/markdown/podman-restart.1.md b/docs/source/markdown/podman-restart.1.md deleted file mode 100644 index 513b9a1bf..000000000 --- a/docs/source/markdown/podman-restart.1.md +++ /dev/null @@ -1,104 +0,0 @@ -% podman-restart 1 - -## NAME -podman\-restart - Restart one or more containers - -## SYNOPSIS -**podman restart** [*options*] *container* ... - -**podman container restart** [*options*] *container* ... - -## DESCRIPTION -The restart command allows containers to be restarted using their ID or name. -Containers will be stopped if they are running and then restarted. Stopped -containers will not be stopped and will only be started. - -## OPTIONS - -#### **--all**, **-a** - -Restart all containers regardless of their current state. - -#### **--cidfile** - -Read container ID from the specified file and restart the container. Can be specified multiple times. - -#### **--filter**, **-f**=*filter* - -Filter what containers restart. -Multiple filters can be given with multiple uses of the --filter flag. -Filters with the same key work inclusive with the only exception being -`label` which is exclusive. Filters with different keys always work exclusive. - -Valid filters are listed below: - -| **Filter** | **Description** | -| --------------- | -------------------------------------------------------------------------------- | -| id | [ID] Container's ID (accepts regex) | -| name | [Name] Container's name (accepts regex) | -| label | [Key] or [Key=Value] Label assigned to a container | -| exited | [Int] Container's exit code | -| status | [Status] Container's status: 'created', 'exited', 'paused', 'running', 'unknown' | -| ancestor | [ImageName] Image or descendant used to create container | -| before | [ID] or [Name] Containers created before this container | -| since | [ID] or [Name] Containers created since this container | -| volume | [VolumeName] or [MountpointDestination] Volume mounted in container | -| health | [Status] healthy or unhealthy | -| pod | [Pod] name or full or partial ID of pod | -| network | [Network] name or full ID of network | - -#### **--latest**, **-l** - -Instead of providing the container name or ID, use the last created container. If you use methods other than Podman -to run containers such as CRI-O, the last started container could be from either of those methods. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines) - -#### **--running** - -Restart all containers that are already in the *running* state. - -#### **--time**, **-t**=*seconds* - -Seconds to wait before forcibly stopping the container. - -## EXAMPLES - -Restart the latest container -``` -$ podman restart -l -ec588fc80b05e19d3006bf2e8aa325f0a2e2ff1f609b7afb39176ca8e3e13467 -``` - -Restart a specific container by partial container ID -``` -$ podman restart ff6cf1 -ff6cf1e5e77e6dba1efc7f3fcdb20e8b89ad8947bc0518be1fcb2c78681f226f -``` - -Restart two containers by name with a timeout of 4 seconds -``` -$ podman restart --time 4 test1 test2 -c3bb026838c30e5097f079fa365c9a4769d52e1017588278fa00d5c68ebc1502 -17e13a63081a995136f907024bcfe50ff532917988a152da229db9d894c5a9ec -``` - -Restart all running containers -``` -$ podman restart --running -``` - -Restart all containers -``` -$ podman restart --all -``` - -Restart container using ID specified in a given files. -``` -$ podman restart --cidfile /home/user/cidfile-1 -$ podman restart --cidfile /home/user/cidfile-1 --cidfile ./cidfile-2 -``` - -## SEE ALSO -**[podman(1)](podman.1.md)** - -## HISTORY -March 2018, Originally compiled by Matt Heon diff --git a/docs/source/markdown/podman-restart.1.md.in b/docs/source/markdown/podman-restart.1.md.in new file mode 100644 index 000000000..71543ef6a --- /dev/null +++ b/docs/source/markdown/podman-restart.1.md.in @@ -0,0 +1,102 @@ +% podman-restart 1 + +## NAME +podman\-restart - Restart one or more containers + +## SYNOPSIS +**podman restart** [*options*] *container* ... + +**podman container restart** [*options*] *container* ... + +## DESCRIPTION +The restart command allows containers to be restarted using their ID or name. +Containers will be stopped if they are running and then restarted. Stopped +containers will not be stopped and will only be started. + +## OPTIONS + +#### **--all**, **-a** + +Restart all containers regardless of their current state. + +#### **--cidfile** + +Read container ID from the specified file and restart the container. Can be specified multiple times. + +#### **--filter**, **-f**=*filter* + +Filter what containers restart. +Multiple filters can be given with multiple uses of the --filter flag. +Filters with the same key work inclusive with the only exception being +`label` which is exclusive. Filters with different keys always work exclusive. + +Valid filters are listed below: + +| **Filter** | **Description** | +| --------------- | -------------------------------------------------------------------------------- | +| id | [ID] Container's ID (accepts regex) | +| name | [Name] Container's name (accepts regex) | +| label | [Key] or [Key=Value] Label assigned to a container | +| exited | [Int] Container's exit code | +| status | [Status] Container's status: 'created', 'exited', 'paused', 'running', 'unknown' | +| ancestor | [ImageName] Image or descendant used to create container | +| before | [ID] or [Name] Containers created before this container | +| since | [ID] or [Name] Containers created since this container | +| volume | [VolumeName] or [MountpointDestination] Volume mounted in container | +| health | [Status] healthy or unhealthy | +| pod | [Pod] name or full or partial ID of pod | +| network | [Network] name or full ID of network | + +#### **--latest**, **-l** + +Instead of providing the container name or ID, use the last created container. If you use methods other than Podman +to run containers such as CRI-O, the last started container could be from either of those methods. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines) + +#### **--running** + +Restart all containers that are already in the *running* state. + +@@option time + +## EXAMPLES + +Restart the latest container +``` +$ podman restart -l +ec588fc80b05e19d3006bf2e8aa325f0a2e2ff1f609b7afb39176ca8e3e13467 +``` + +Restart a specific container by partial container ID +``` +$ podman restart ff6cf1 +ff6cf1e5e77e6dba1efc7f3fcdb20e8b89ad8947bc0518be1fcb2c78681f226f +``` + +Restart two containers by name with a timeout of 4 seconds +``` +$ podman restart --time 4 test1 test2 +c3bb026838c30e5097f079fa365c9a4769d52e1017588278fa00d5c68ebc1502 +17e13a63081a995136f907024bcfe50ff532917988a152da229db9d894c5a9ec +``` + +Restart all running containers +``` +$ podman restart --running +``` + +Restart all containers +``` +$ podman restart --all +``` + +Restart container using ID specified in a given files. +``` +$ podman restart --cidfile /home/user/cidfile-1 +$ podman restart --cidfile /home/user/cidfile-1 --cidfile ./cidfile-2 +``` + +## SEE ALSO +**[podman(1)](podman.1.md)** + +## HISTORY +March 2018, Originally compiled by Matt Heon diff --git a/docs/source/markdown/podman-rm.1.md.in b/docs/source/markdown/podman-rm.1.md.in index 6f4366ce9..b3bff4934 100644 --- a/docs/source/markdown/podman-rm.1.md.in +++ b/docs/source/markdown/podman-rm.1.md.in @@ -63,9 +63,9 @@ whose OCI runtime has become unavailable. Instead of providing the container name or ID, use the last created container. If you use methods other than Podman to run containers such as CRI-O, the last started container could be from either of those methods. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines) -#### **--time**, **-t**=*seconds* +@@option time -Seconds to wait before forcibly stopping the container. The --force option must be specified to use the --time option. +The --force option must be specified to use the --time option. #### **--volumes**, **-v** diff --git a/docs/source/markdown/podman-stop.1.md.in b/docs/source/markdown/podman-stop.1.md.in index 7b32ca4b0..ec5fd79b6 100644 --- a/docs/source/markdown/podman-stop.1.md.in +++ b/docs/source/markdown/podman-stop.1.md.in @@ -54,9 +54,7 @@ Valid filters are listed below: Instead of providing the container name or ID, use the last created container. If you use methods other than Podman to run containers such as CRI-O, the last started container could be from either of those methods. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines) -#### **--time**, **-t**=*seconds* - -Seconds to wait before forcibly stopping the container +@@option time ## EXAMPLES -- cgit v1.2.3-54-g00ecf