瀏覽代碼

prevent image prune panic

Signed-off-by: Alfred Landrum <alfred.landrum@docker.com>
Alfred Landrum 8 年之前
父節點
當前提交
32da2a4234
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      daemon/prune.go

+ 1 - 1
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