do not throw an error on build with provider services

Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
This commit is contained in:
Guillaume Lours 2025-05-16 17:36:32 +02:00 committed by Nicolas De loof
parent 23fc76a540
commit 944e5e67a1
1 changed files with 1 additions and 1 deletions

View File

@ -165,7 +165,7 @@ type BuildOptions struct {
func (o BuildOptions) Apply(project *types.Project) error {
platform := project.Environment["DOCKER_DEFAULT_PLATFORM"]
for name, service := range project.Services {
if service.Image == "" && service.Build == nil {
if service.Provider == nil && service.Image == "" && service.Build == nil {
return fmt.Errorf("invalid service %q. Must specify either image or build", name)
}