v2podman container cleanup

add the ability to clean up after a container has attempted to run.  this is also important for podman run --rm --rmi.

also included are fixes and tweaks to various code bits to correct regressions on output.

Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
Brent Baude
2020-04-09 16:11:38 -05:00
parent 3a4bd39516
commit 7d0e0a7129
10 changed files with 174 additions and 15 deletions

View File

@ -265,3 +265,21 @@ type ContainerRunReport struct {
ExitCode int
Id string
}
// ContainerCleanupOptions are the CLI values for the
// cleanup command
type ContainerCleanupOptions struct {
All bool
Latest bool
Remove bool
RemoveImage bool
}
// ContainerCleanupReport describes the response from a
// container cleanup
type ContainerCleanupReport struct {
CleanErr error
Id string
RmErr error
RmiErr error
}