Skip to content

Commit

Permalink
use compose service methods when exist instead of directly service.do…
Browse files Browse the repository at this point in the history
…ckerCli

Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
  • Loading branch information
glours authored and ndeloof committed Jan 13, 2023
1 parent 8c07fa4 commit 5a2b7b8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/compose/attach.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (s *composeService) attachContainer(ctx context.Context, container moby.Con
})
})

inspect, err := s.dockerCli.Client().ContainerInspect(ctx, container.ID)
inspect, err := s.apiClient().ContainerInspect(ctx, container.ID)
if err != nil {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/compose/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func (s *composeService) pullServiceImage(ctx context.Context, service types.Ser
Text: "Pulled",
})

inspected, _, err := s.dockerCli.Client().ImageInspectWithRaw(ctx, service.Image)
inspected, _, err := s.apiClient().ImageInspectWithRaw(ctx, service.Image)
if err != nil {
return "", err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/compose/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func (s *composeService) prepareRun(ctx context.Context, project *types.Project,

applyRunOptions(project, &service, opts)

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

Expand Down

0 comments on commit 5a2b7b8

Please sign in to comment.