浏览代码

do not throw an error on build with provider services

Signed-off-by: Guillaume Lours <[email protected]>
Guillaume Lours 6 月之前
父节点
当前提交
944e5e67a1
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      pkg/api/api.go

+ 1 - 1
pkg/api/api.go

@@ -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)
 		}