cli/command/container: ForwardAllSignals: rewrite to use ContainerAPIClient

This function only needed the ContainerAPIClient, and not the whole CLI. This
patch refactors it to use the shallower interface.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2023-11-06 10:34:37 +01:00
parent ad861cdb39
commit 3cd77c9d54
6 changed files with 13 additions and 17 deletions

View File

@ -106,7 +106,7 @@ func RunAttach(ctx context.Context, dockerCli command.Cli, target string, opts *
if opts.Proxy && !c.Config.Tty {
sigc := notifyAllSignals()
go ForwardAllSignals(ctx, dockerCli, target, sigc)
go ForwardAllSignals(ctx, apiClient, target, sigc)
defer signal.StopCatch(sigc)
}