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

Method removeContainers

pkg/compose/down.go:336–344  ·  view source on GitHub ↗
(ctx context.Context, containers []containerType.Summary, service *types.ServiceConfig, timeout *time.Duration, volumes bool)

Source from the content-addressed store, hash-verified

334}
335
336func (s *composeService) removeContainers(ctx context.Context, containers []containerType.Summary, service *types.ServiceConfig, timeout *time.Duration, volumes bool) error {
337 eg, ctx := errgroup.WithContext(ctx)
338 for _, ctr := range containers {
339 eg.Go(func() error {
340 return s.stopAndRemoveContainer(ctx, ctr, service, timeout, volumes)
341 })
342 }
343 return eg.Wait()
344}
345
346func (s *composeService) stopAndRemoveContainer(ctx context.Context, ctr containerType.Summary, service *types.ServiceConfig, timeout *time.Duration, volumes bool) error {
347 eventName := getContainerProgressName(ctr)

Callers 1

downMethod · 0.95

Calls 2

WaitMethod · 0.65

Tested by

no test coverage detected