Support stdin once

We leave the stdin open on first client disconnect if stdin once
is not set in the container configuration.

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
Mrunal Patel 2018-01-05 19:36:10 -08:00
parent 3ab6c36b83
commit a480b20652
2 changed files with 11 additions and 2 deletions

View file

@ -189,6 +189,9 @@ func (r *Runtime) CreateContainer(c *Container, cgroupParent string) (err error)
if c.terminal {
args = append(args, "-t")
} else if c.stdin {
if !c.stdinOnce {
args = append(args, "--leave-stdin-open")
}
args = append(args, "-i")
}
logrus.WithFields(logrus.Fields{