diff --git a/cli/connhelper/connhelper.go b/cli/connhelper/connhelper.go index e93bf5f61a..309320889f 100644 --- a/cli/connhelper/connhelper.go +++ b/cli/connhelper/connhelper.go @@ -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) }