From 5a2b7b83cd19e8254183a0752bc0448fc3efaf78 Mon Sep 17 00:00:00 2001 From: Guillaume Lours <705411+glours@users.noreply.github.com> Date: Fri, 13 Jan 2023 19:07:44 +0100 Subject: [PATCH] use compose service methods when exist instead of directly service.dockerCli Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com> --- pkg/compose/attach.go | 2 +- pkg/compose/pull.go | 2 +- pkg/compose/run.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/compose/attach.go b/pkg/compose/attach.go index c339f3f6b..4f4e766c7 100644 --- a/pkg/compose/attach.go +++ b/pkg/compose/attach.go @@ -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 } diff --git a/pkg/compose/pull.go b/pkg/compose/pull.go index a2b1663c0..05057c65c 100644 --- a/pkg/compose/pull.go +++ b/pkg/compose/pull.go @@ -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 } diff --git a/pkg/compose/run.go b/pkg/compose/run.go index 0e6329f70..bd16b435b 100644 --- a/pkg/compose/run.go +++ b/pkg/compose/run.go @@ -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 }