diff --git a/fakes/image.go b/fakes/image.go index 9520a9af..40cffd44 100644 --- a/fakes/image.go +++ b/fakes/image.go @@ -101,6 +101,9 @@ func (i *Image) Rebase(baseTopLayer string, newBase imgutil.Image) error { } func (i *Image) SetLabel(k string, v string) error { + if i.labels == nil { + i.labels = map[string]string{} + } i.labels[k] = v return nil }