prevent image prune panic
Signed-off-by: Alfred Landrum <alfred.landrum@docker.com> (cherry picked from commit 32da2a4234c5c68ff466dc1afc91ba98dbbe199a)
This commit is contained in:
committed by
Kenfe-Mickael Laventure
parent
7f8486a39a
commit
43484d9284
@@ -216,7 +216,7 @@ func (daemon *Daemon) ImagesPrune(ctx context.Context, pruneFilters filters.Args
|
||||
if !until.IsZero() && img.Created.After(until) {
|
||||
continue
|
||||
}
|
||||
if !matchLabels(pruneFilters, img.Config.Labels) {
|
||||
if img.Config != nil && !matchLabels(pruneFilters, img.Config.Labels) {
|
||||
continue
|
||||
}
|
||||
topImages[id] = img
|
||||
|
||||
Reference in New Issue
Block a user