Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use compose service methods when exist instead of directly service.dockerCli #10175

Merged
merged 1 commit into from
Jan 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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