Pārlūkot izejas kodu

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 <boynux@gmail.com>
boynux 9 gadi atpakaļ
vecāks
revīzija
f6dd023b4e
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      daemon/list.go

+ 1 - 1
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
 			}