1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

build: fix panic when exporting to tar

Fixes a panic on `docker build -t foo -o - . >/dev/null`

Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
Tibor Vass 2019-06-03 22:34:13 +00:00
parent 3d21b86e0a
commit 6104eb1ae2

View file

@ -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))
}
err = tagger.TagImages(image.ID(imageID))
if imageID != "" {
err = tagger.TagImages(image.ID(imageID))
}
return imageID, err
}