summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-03-23 15:45:26 +0100
committerGitHub <noreply@github.com>2020-03-23 15:45:26 +0100
commit48b3143656bde2163025d43a8a9b2c88208ffee8 (patch)
tree75052f7a8355af08f37d23a89ae90f80b030466b /pkg
parentb743f60a4b9e51a5fad1b1ba7cb28f9a7f1a7d2c (diff)
parentabb60fbba2d4e9f4795d5be8a14001e8a72ec7d7 (diff)
downloadpodman-48b3143656bde2163025d43a8a9b2c88208ffee8.tar.gz
podman-48b3143656bde2163025d43a8a9b2c88208ffee8.tar.bz2
podman-48b3143656bde2163025d43a8a9b2c88208ffee8.zip
Merge pull request #5436 from QiWang19/rm_created_ctr
container prune remove state created, configured
Diffstat (limited to 'pkg')
-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