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

Method startDependencies

pkg/compose/run.go:279–298  ·  pkg/compose/run.go::composeService.startDependencies
(ctx context.Context, project *types.Project, options api.RunOptions)

Source from the content-addressed store, hash-verified

277}
278
279func (s *composeService) startDependencies(ctx context.Context, project *types.Project, options api.RunOptions) error {
280 project = project.WithServicesDisabled(options.Service)
281
282 err := s.Create(ctx, project, api.CreateOptions{
283 Build: options.Build,
284 IgnoreOrphans: options.IgnoreOrphans,
285 RemoveOrphans: options.RemoveOrphans,
286 QuietPull: options.QuietPull,
287 })
288 if err != nil {
289 return err
290 }
291
292 if len(project.Services) > 0 {
293 return s.Start(ctx, project.Name, api.StartOptions{
294 Project: project,
295 })
296 }
297 return nil
298}

Callers 1

prepareRunMethod · 0.95

Calls 2

CreateMethod · 0.95
StartMethod · 0.95

Tested by

no test coverage detected