mirror of
https://github.com/containers/podman.git
synced 2025-06-29 23:22:40 +08:00
Ability to prune container in api V2
Adds ability to prune containers for v2. Adds client side prompt with force flag and filters options to prune. Signed-off-by: Sujil02 <sushah@redhat.com>
This commit is contained in:
@ -887,8 +887,9 @@ func (r *Runtime) PruneContainers(filterFuncs []ContainerFilter) (map[string]int
|
||||
continue
|
||||
}
|
||||
err = r.RemoveContainer(context.Background(), ctr, false, false)
|
||||
pruneErrors[ctr.ID()] = err
|
||||
if err != nil {
|
||||
pruneErrors[ctr.ID()] = err
|
||||
} else {
|
||||
prunedContainers[ctr.ID()] = size
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user