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:
parent
3d21b86e0a
commit
6104eb1ae2
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue