op.#SaveImage: fix data race

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi 2021-10-12 16:05:43 -07:00
parent b2c4fea73d
commit e5c571b8a9

View File

@ -892,6 +892,8 @@ func (p *Pipeline) SaveImage(ctx context.Context, op *compiler.Value, st llb.Sta
image []byte
)
go func() {
var err error
image, err = io.ReadAll(pipeR)
errCh <- err
}()