MCPcopy
hub / github.com/docker/compose / isServiceImageToBuild

Function isServiceImageToBuild

pkg/compose/pull.go:380–398  ·  view source on GitHub ↗
(service types.ServiceConfig, services types.Services)

Source from the content-addressed store, hash-verified

378}
379
380func isServiceImageToBuild(service types.ServiceConfig, services types.Services) bool {
381 if service.Build != nil {
382 return true
383 }
384
385 if service.Image == "" {
386 // N.B. this should be impossible as service must have either `build` or `image` (or both)
387 return false
388 }
389
390 // look through the other services to see if another has a build definition for the same
391 // image name
392 for _, svc := range services {
393 if svc.Image == service.Image && svc.Build != nil {
394 return true
395 }
396 }
397 return false
398}
399
400const (
401 PreparingPhase = "Preparing"

Callers 1

pullRequiredImagesMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected