Skip to content

Commit 5a2b7b8

Browse files
gloursndeloof
authored andcommitted
use compose service methods when exist instead of directly service.dockerCli
Signed-off-by: Guillaume Lours <[email protected]>
1 parent 8c07fa4 commit 5a2b7b8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

pkg/compose/attach.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func (s *composeService) attachContainer(ctx context.Context, container moby.Con
8686
})
8787
})
8888

89-
inspect, err := s.dockerCli.Client().ContainerInspect(ctx, container.ID)
89+
inspect, err := s.apiClient().ContainerInspect(ctx, container.ID)
9090
if err != nil {
9191
return err
9292
}

pkg/compose/pull.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ func (s *composeService) pullServiceImage(ctx context.Context, service types.Ser
235235
Text: "Pulled",
236236
})
237237

238-
inspected, _, err := s.dockerCli.Client().ImageInspectWithRaw(ctx, service.Image)
238+
inspected, _, err := s.apiClient().ImageInspectWithRaw(ctx, service.Image)
239239
if err != nil {
240240
return "", err
241241
}

pkg/compose/run.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func (s *composeService) prepareRun(ctx context.Context, project *types.Project,
5656

5757
applyRunOptions(project, &service, opts)
5858

59-
if err := s.dockerCli.In().CheckTty(opts.Interactive, service.Tty); err != nil {
59+
if err := s.stdin().CheckTty(opts.Interactive, service.Tty); err != nil {
6060
return "", err
6161
}
6262

0 commit comments

Comments
 (0)