From abb60fbba2d4e9f4795d5be8a14001e8a72ec7d7 Mon Sep 17 00:00:00 2001 From: Qi Wang Date: Mon, 9 Mar 2020 18:33:19 -0400 Subject: container prune remove state created, configured podman container prune should remove containers with state Created, Configured to be compatible with docker Signed-off-by: Qi Wang --- pkg/adapter/containers.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/adapter/containers.go b/pkg/adapter/containers.go index a5242270e..0d2ca1a64 100644 --- a/pkg/adapter/containers.go +++ b/pkg/adapter/containers.go @@ -1057,7 +1057,8 @@ func (r *LocalRuntime) Prune(ctx context.Context, maxWorkers int, filters []stri if c.PodID() != "" { return false } - if state == define.ContainerStateStopped || state == define.ContainerStateExited { + if state == define.ContainerStateStopped || state == define.ContainerStateExited || + state == define.ContainerStateCreated || state == define.ContainerStateConfigured { return true } return false -- cgit v1.2.3-54-g00ecf