diff --git a/internal/builder/builder.go b/internal/builder/builder.go index 0c4522b9e6..770f1454a3 100644 --- a/internal/builder/builder.go +++ b/internal/builder/builder.go @@ -932,7 +932,12 @@ func orderFileContents(order dist.Order, orderExt dist.Order) (string, error) { func (b *Builder) stackLayer(dest string) (string, error) { buf := &bytes.Buffer{} - err := toml.NewEncoder(buf).Encode(b.metadata.Stack) + var err error + if b.metadata.Stack.RunImage.Image != "" { + err = toml.NewEncoder(buf).Encode(b.metadata.Stack) + } else if len(b.metadata.RunImages) > 0 { + err = toml.NewEncoder(buf).Encode(b.metadata.RunImages[0]) + } if err != nil { return "", errors.Wrapf(err, "failed to marshal stack.toml") } diff --git a/internal/builder/writer/human_readable.go b/internal/builder/writer/human_readable.go index 25a339a939..dc88df881c 100644 --- a/internal/builder/writer/human_readable.go +++ b/internal/builder/writer/human_readable.go @@ -46,8 +46,8 @@ Created By: {{ end -}} Trusted: {{.Trusted}} -{{ if ne .Info.Stack "" -}} -Stack: + +{{ if ne .Info.Stack "" -}}Stack: ID: {{ .Info.Stack }}{{ end -}} {{- if .Verbose}} {{- if ne (len .Info.Mixins) 0 }}