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

Function runStart

cmd/compose/start.go:54–73  ·  cmd/compose/start.go::runStart
(ctx context.Context, dockerCli command.Cli, backendOptions *BackendOptions, opts startOptions, services []string)

Source from the content-addressed store, hash-verified

52}
53
54func runStart(ctx context.Context, dockerCli command.Cli, backendOptions *BackendOptions, opts startOptions, services []string) error {
55 project, name, err := opts.projectOrName(ctx, dockerCli, services...)
56 if err != nil {
57 return err
58 }
59
60 var timeout time.Duration
61 if opts.waitTimeout > 0 {
62 timeout = time.Duration(opts.waitTimeout) * time.Second
63 }
64 return withBackend(dockerCli, backendOptions, func(backend api.Compose) error {
65 return backend.Start(ctx, name, api.StartOptions{
66 AttachTo: services,
67 Project: project,
68 Services: services,
69 Wait: opts.wait,
70 WaitTimeout: timeout,
71 })
72 })
73}

Callers 1

startCommandFunction · 0.85

Calls 3

withBackendFunction · 0.85
projectOrNameMethod · 0.80
StartMethod · 0.65

Tested by

no test coverage detected