c8d/list: Don't setup label filter if it's not specified
Don't run filter function which would only run through the images reading theirs config without checking any label anyway. Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
parent
a9bca45e92
commit
6f3892dc99
1 changed files with 4 additions and 0 deletions
|
@ -551,6 +551,10 @@ func setupLabelFilter(store content.Store, fltrs filters.Args) (func(image image
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(checks) == 0 {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
|
||||||
return func(image images.Image) bool {
|
return func(image images.Image) bool {
|
||||||
ctx := context.TODO()
|
ctx := context.TODO()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue