From ec4060aef6c77c049fc2c3b6438ebb5590f6ab69 Mon Sep 17 00:00:00 2001 From: Sujil02 Date: Wed, 8 Apr 2020 04:49:32 -0400 Subject: 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 --- libpod/runtime_ctr.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libpod') diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go index 207ac6477..9d3e69d56 100644 --- a/libpod/runtime_ctr.go +++ b/libpod/runtime_ctr.go @@ -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 } } -- cgit v1.2.3-54-g00ecf