diff --git a/cmd/compose/create.go b/cmd/compose/create.go index 829c073ef..2e652cf47 100644 --- a/cmd/compose/create.go +++ b/cmd/compose/create.go @@ -159,16 +159,6 @@ func (opts createOptions) Apply(project *types.Project) error { project.Services[i] = service } } - // opts.noBuild, however, means do not perform ANY builds - if opts.noBuild { - for i, service := range project.Services { - service.Build = nil - if service.Image == "" { - service.Image = api.GetImageNameOrDefault(service, project.Name) - } - project.Services[i] = service - } - } if err := applyPlatforms(project, true); err != nil { return err diff --git a/cmd/compose/up.go b/cmd/compose/up.go index 28d03caa2..a86d1964c 100644 --- a/cmd/compose/up.go +++ b/cmd/compose/up.go @@ -177,8 +177,6 @@ func runUp( } var build *api.BuildOptions - // this check is technically redundant as createOptions::apply() - // already removed all the build sections if !createOptions.noBuild { if createOptions.quietPull { buildOptions.Progress = string(xprogress.QuietMode)