From d775d7b8618aa50e5b3c7904ad12730893b7b8ce Mon Sep 17 00:00:00 2001 From: Teppei Fukuda Date: Wed, 3 Nov 2021 15:14:17 +0200 Subject: [PATCH] fix(daemon): handle nil config (#322) --- image/daemon/image.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/image/daemon/image.go b/image/daemon/image.go index 86d7f832a..b4ab5841d 100644 --- a/image/daemon/image.go +++ b/image/daemon/image.go @@ -172,6 +172,10 @@ func (img *image) diffIDs() ([]v1.Hash, error) { } func (img *image) imageConfig(config *container.Config) v1.Config { + if config == nil { + return v1.Config{} + } + c := v1.Config{ AttachStderr: config.AttachStderr, AttachStdin: config.AttachStdin,