diff --git a/solver/llbsolver/provenance.go b/solver/llbsolver/provenance.go index 9138d6d9f88f..26abf78d1c6c 100644 --- a/solver/llbsolver/provenance.go +++ b/solver/llbsolver/provenance.go @@ -137,12 +137,14 @@ func (b *provenanceBridge) ResolveImageConfig(ctx context.Context, ref string, o return "", "", nil, err } + b.mu.Lock() b.images = append(b.images, provenance.ImageSource{ Ref: ref, Platform: opt.Platform, Digest: dgst, Local: opt.ResolverType == llb.ResolverTypeOCILayout, }) + b.mu.Unlock() return ref, dgst, config, nil }