exec: always make explicit the tty value

otherwise runc will take by default the value used for creating the
container.  Setting it explicit overrides its default value and we
won't end up trying to use a terminal when not available.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1625876

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano 2018-11-20 10:00:20 +01:00
parent ea928f2de6
commit fd01402930
No known key found for this signature in database
GPG key ID: E4730F97F60286ED

View file

@ -741,6 +741,8 @@ func (r *OCIRuntime) execContainer(c *Container, cmd, capAdd, env []string, tty
if tty {
args = append(args, "--tty")
} else {
args = append(args, "--tty=false")
}
if user != "" {