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>
(cherry picked from commit 6104eb1ae2
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
a62d9b9c21
commit
b915ec1e7b
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