mirror of https://github.com/docker/cli.git
cli/connhelper: raise remote binary evaluation out of dialer context
Signed-off-by: Matthew MacLeod <matt@umm.io>
This commit is contained in:
parent
43dbdcfe1e
commit
43dd6ea464
|
@ -54,9 +54,10 @@ func getConnectionHelper(daemonURL string, sshFlags []string) (*ConnectionHelper
|
|||
}
|
||||
sshFlags = addSSHTimeout(sshFlags)
|
||||
sshFlags = disablePseudoTerminalAllocation(sshFlags)
|
||||
remoteDockerBinary := dockerSSHRemoteBinary()
|
||||
return &ConnectionHelper{
|
||||
Dialer: func(ctx context.Context, network, addr string) (net.Conn, error) {
|
||||
args := []string{dockerSSHRemoteBinary()}
|
||||
args := []string{remoteDockerBinary}
|
||||
if sp.Path != "" {
|
||||
args = append(args, "--host", "unix://"+sp.Path)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue