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>
| ... | ... |
@@ -312,7 +312,7 @@ func includeContainerInList(container *container.Container, ctx *listContext) it |
| 312 | 312 |
if len(ctx.exitAllowed) > 0 {
|
| 313 | 313 |
shouldSkip := true |
| 314 | 314 |
for _, code := range ctx.exitAllowed {
|
| 315 |
- if code == container.ExitCode && !container.Running {
|
|
| 315 |
+ if code == container.ExitCode && !container.Running && !container.StartedAt.IsZero() {
|
|
| 316 | 316 |
shouldSkip = false |
| 317 | 317 |
break |
| 318 | 318 |
} |