mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
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>
This commit is contained in:
parent
577adcc1ee
commit
f6dd023b4e
1 changed files with 1 additions and 1 deletions
|
@ -312,7 +312,7 @@ func includeContainerInList(container *container.Container, ctx *listContext) it
|
||||||
if len(ctx.exitAllowed) > 0 {
|
if len(ctx.exitAllowed) > 0 {
|
||||||
shouldSkip := true
|
shouldSkip := true
|
||||||
for _, code := range ctx.exitAllowed {
|
for _, code := range ctx.exitAllowed {
|
||||||
if code == container.ExitCode && !container.Running {
|
if code == container.ExitCode && !container.Running && !container.StartedAt.IsZero() {
|
||||||
shouldSkip = false
|
shouldSkip = false
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue