diff --git a/frontend/dockerfile/builder/build.go b/frontend/dockerfile/builder/build.go index 18eb697f..74e60c6e 100644 --- a/frontend/dockerfile/builder/build.go +++ b/frontend/dockerfile/builder/build.go @@ -819,6 +819,10 @@ func contextByNameFunc(c client.Client, p *ocispecs.Platform) func(context.Conte } name = strings.TrimSuffix(reference.FamiliarString(named), ":latest") + if p == nil { + pp := platforms.Normalize(platforms.DefaultSpec()) + p = &pp + } if p != nil { name := name + "::" + platforms.Format(platforms.Normalize(*p)) st, img, err := contextByName(ctx, c, name, p)