diff --git a/frontend/dockerfile/dockerfile2llb/convert.go b/frontend/dockerfile/dockerfile2llb/convert.go index fd0cd28c..cc591f43 100644 --- a/frontend/dockerfile/dockerfile2llb/convert.go +++ b/frontend/dockerfile/dockerfile2llb/convert.go @@ -212,7 +212,7 @@ func Dockerfile2LLB(ctx context.Context, dt []byte, opt ConvertOpt) (*llb.State, eg.Go(func() error { ref, err := reference.ParseNormalizedNamed(d.stage.BaseName) if err != nil { - return err + return errors.Wrapf(err, "failed to parse stage name %q", d.stage.BaseName) } platform := d.platform if platform == nil {