From 43484d9284ac5118042420108d7ac90e14e3bb27 Mon Sep 17 00:00:00 2001 From: Alfred Landrum Date: Fri, 26 May 2017 12:54:33 -0700 Subject: [PATCH] prevent image prune panic Signed-off-by: Alfred Landrum (cherry picked from commit 32da2a4234c5c68ff466dc1afc91ba98dbbe199a) --- components/engine/daemon/prune.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/engine/daemon/prune.go b/components/engine/daemon/prune.go index c614de2fe1..602de618c9 100644 --- a/components/engine/daemon/prune.go +++ b/components/engine/daemon/prune.go @@ -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