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

Method attachContainer

pkg/compose/attach.go:66–70  ·  pkg/compose/attach.go::composeService.attachContainer
(ctx context.Context, container containerType.Summary, listener api.ContainerEventListener)

Source from the content-addressed store, hash-verified

64}
65
66func (s *composeService) attachContainer(ctx context.Context, container containerType.Summary, listener api.ContainerEventListener) error {
67 service := container.Labels[api.ServiceLabel]
68 name := getContainerNameWithoutProject(container)
69 return s.doAttachContainer(ctx, service, container.ID, name, listener)
70}
71
72func (s *composeService) doAttachContainer(ctx context.Context, service, id, name string, listener api.ContainerEventListener) error {
73 inspect, err := s.apiClient().ContainerInspect(ctx, id, client.ContainerInspectOptions{})

Callers 1

attachMethod · 0.95

Calls 2

doAttachContainerMethod · 0.95

Tested by

no test coverage detected