From f6dd023b4e3fe13fc30a3ecce7559c1dfa54d609 Mon Sep 17 00:00:00 2001 From: boynux Date: Mon, 11 Apr 2016 23:44:05 +0200 Subject: [PATCH] exited=0 in filter shouldn't show "Created" ones Newly created containers which are not started yet should not list when "exited=0" filter is used with "ps -a" Signed-off-by: Boynux --- daemon/list.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/list.go b/daemon/list.go index c29eaadb42..f8b23b061d 100644 --- a/daemon/list.go +++ b/daemon/list.go @@ -312,7 +312,7 @@ func includeContainerInList(container *container.Container, ctx *listContext) it if len(ctx.exitAllowed) > 0 { shouldSkip := true for _, code := range ctx.exitAllowed { - if code == container.ExitCode && !container.Running { + if code == container.ExitCode && !container.Running && !container.StartedAt.IsZero() { shouldSkip = false break }