Merge pull request #33409 from alfred-landrum/image-prune-panic

prevent image prune panic
Upstream-commit: bde4c893513f986041dbe43965ae514a2612aed5
Component: engine
This commit is contained in:
Akihiro Suda
2017-05-27 09:37:27 +09:00
committed by GitHub

View File

@ -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