diff --git a/pkg/compose/build.go b/pkg/compose/build.go index a1ca27669..5e9dbe2f2 100644 --- a/pkg/compose/build.go +++ b/pkg/compose/build.go @@ -261,6 +261,13 @@ func (s *composeService) toBuildOptions(project *types.Project, service types.Se })) var plats []specs.Platform + if platform, ok := project.Environment["DOCKER_DEFAULT_PLATFORM"]; ok { + p, err := platforms.Parse(platform) + if err != nil { + return build.Options{}, err + } + plats = append(plats, p) + } if service.Platform != "" { p, err := platforms.Parse(service.Platform) if err != nil {