diff options
author | Qi Wang <qiwan@redhat.com> | 2020-03-09 18:33:19 -0400 |
---|---|---|
committer | Qi Wang <qiwan@redhat.com> | 2020-03-10 10:57:51 -0400 |
commit | abb60fbba2d4e9f4795d5be8a14001e8a72ec7d7 (patch) | |
tree | f50642088f8c5fbece3e11fc0682f6ea8a5c431a /pkg | |
parent | d2764e93df580755fe1b3a1befb79eeff75c4bc4 (diff) | |
download | podman-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')
-rw-r--r-- | pkg/adapter/containers.go | 3 |
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 |