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

Method apply

cmd/compose/pull.go:80–99  ·  cmd/compose/pull.go::pullOptions.apply
(project *types.Project, services []string)

Source from the content-addressed store, hash-verified

78}
79
80func (opts pullOptions) apply(project *types.Project, services []string) (*types.Project, error) {
81 if !opts.includeDeps {
82 var err error
83 project, err = project.WithSelectedServices(services, types.IgnoreDependencies)
84 if err != nil {
85 return nil, err
86 }
87 }
88
89 if opts.policy != "" {
90 for i, service := range project.Services {
91 if service.Image == "" {
92 continue
93 }
94 service.PullPolicy = opts.policy
95 project.Services[i] = service
96 }
97 }
98 return project, nil
99}
100
101func runPull(ctx context.Context, dockerCli command.Cli, backendOptions *BackendOptions, opts pullOptions, services []string) error {
102 backend, err := compose.NewComposeService(dockerCli, backendOptions.Options...)

Callers 1

runPullFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected