remove container/pod id file along with container/pod

Remove the container/pod ID file along with the container/pod.  It's
primarily used in the context of systemd and are not useful nor needed
once a container/pod has ceased to exist.

Fixes: #16387
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
Valentin Rothberg
2022-11-03 13:16:16 +01:00
parent 6428ff180a
commit 3fee351c35
9 changed files with 52 additions and 12 deletions

View File

@ -4,4 +4,4 @@
####> are applicable to all of those.
#### **--cidfile**=*file*
Write the container ID to *file*.
Write the container ID to *file*. The file will be removed along with the container.

View File

@ -26,6 +26,7 @@ Stop running containers and delete all stopped containers before removal of 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)
@@option pod-id-file.pod
If specified, the pod-id-file will be removed along with the pod.
@@option time

View File

@ -57,6 +57,8 @@ In addition, forcing can be used to remove unusable containers, e.g. containers
whose OCI runtime has become unavailable.
@@option ignore
Further ignore when the specified `--cidfile` does not exist as it may have
already been removed along with the container.
#### **--latest**, **-l**