1
0
Эх сурвалжийг харах

ignore image we can't build when forcing PullPolicyBuild

close https://github.com/docker/compose-cli/issues/1776

Signed-off-by: Nicolas De Loof <[email protected]>
Nicolas De Loof 4 жил өмнө
parent
commit
679d24a178

+ 3 - 0
cli/cmd/compose/create.go

@@ -104,6 +104,9 @@ func (opts createOptions) GetTimeout() *time.Duration {
 func (opts createOptions) Apply(project *types.Project) {
 	if opts.Build {
 		for i, service := range project.Services {
+			if service.Build == nil {
+				continue
+			}
 			service.PullPolicy = types.PullPolicyBuild
 			project.Services[i] = service
 		}