mirror of
https://github.com/containers/podman.git
synced 2025-08-06 03:19:52 +08:00
Add the rmi flag to podman-run to delete container image
The --rmi flag will delete the container image after its execution unless that image is already been used by another container(s). This is useful when one wants to execute a container once and remove any resources attached to it. Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
This commit is contained in:
@ -22,6 +22,14 @@ to run containers such as CRI-O, the last started container could be from either
|
||||
|
||||
The latest option is not supported on the remote client.
|
||||
|
||||
**--rm**
|
||||
|
||||
After cleanup, remove the container entirely.
|
||||
|
||||
**--rmi**
|
||||
|
||||
After cleanup, remove the image entirely.
|
||||
|
||||
## EXAMPLE
|
||||
|
||||
`podman container cleanup mywebserver`
|
||||
|
@ -689,6 +689,11 @@ Note that the container will not be removed when it could not be created or
|
||||
started successfully. This allows the user to inspect the container after
|
||||
failure.
|
||||
|
||||
**--rmi**=*true|false*
|
||||
|
||||
After exit of the container, remove the image unless another
|
||||
container is using it. The default is *false*.
|
||||
|
||||
**--rootfs**
|
||||
|
||||
If specified, the first argument refers to an exploded container on the file system.
|
||||
|
Reference in New Issue
Block a user