build: fix panic when exporting to tar
Fixes a panic on `docker build -t foo -o - . >/dev/null`
@@ -91,7 +91,9 @@ func (b *Backend) Build(ctx context.Context, config backend.BuildConfig) (string
stdout := config.ProgressWriter.StdoutFormatter
fmt.Fprintf(stdout, "Successfully built %s\n", stringid.TruncateID(imageID))
}
+ if imageID != "" {
err = tagger.TagImages(image.ID(imageID))
+ }
return imageID, err
}
