Setting `Setsid` is needed for SSH connection helper with `ProxyCommand`
config, so as to detach TTY.
e.g.
$ cat ~/.ssh/config
Host foo
Hostname foo
ProxyCommand ssh -W %h:%p bastion
$ DOCKER_HOST=ssh://foo docker run -it --rm alpine
/ #
Fix #1707
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
14 lines
238 B
Go
14 lines
238 B
Go
// +build !windows
|
|
|
|
package commandconn
|
|
|
|
import (
|
|
"os/exec"
|
|
)
|
|
|
|
func createSession(cmd *exec.Cmd) {
|
|
// for supporting ssh connection helper with ProxyCommand
|
|
// https://github.com/docker/cli/issues/1707
|
|
cmd.SysProcAttr.Setsid = true
|
|
}
|