aboutsummaryrefslogtreecommitdiff
path: root/pkg/adapter
diff options
context:
space:
mode:
authorQi Wang <qiwan@redhat.com>2020-03-09 18:33:19 -0400
committerQi Wang <qiwan@redhat.com>2020-03-10 10:57:51 -0400
commitabb60fbba2d4e9f4795d5be8a14001e8a72ec7d7 (patch)
treef50642088f8c5fbece3e11fc0682f6ea8a5c431a /pkg/adapter
parentd2764e93df580755fe1b3a1befb79eeff75c4bc4 (diff)
downloadpodman-abb60fbba2d4e9f4795d5be8a14001e8a72ec7d7.tar.gz
podman-abb60fbba2d4e9f4795d5be8a14001e8a72ec7d7.tar.bz2
podman-abb60fbba2d4e9f4795d5be8a14001e8a72ec7d7.zip
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 <qiwan@redhat.com>
Diffstat (limited to 'pkg/adapter')
-rw-r--r--pkg/adapter/containers.go3
1 files changed, 2 insertions, 1 deletions
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