From 20693cd38d13ffab2e391a467582b0cc98140bfb Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Thu, 2 Jul 2015 14:50:17 -0700 Subject: [PATCH] Enable pseudo tty setting --- shared/build/script/docker.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/shared/build/script/docker.go b/shared/build/script/docker.go index 185c293e0..c06e9e4d2 100644 --- a/shared/build/script/docker.go +++ b/shared/build/script/docker.go @@ -14,6 +14,9 @@ type Docker struct { // Hostname (also known as `--hostname` option) // Could be set only if Docker is running in privileged mode Hostname *string `yaml:"hostname,omitempty"` + + // Allocate a pseudo-TTY (also known as `--tty` option) + TTY bool `yaml:"tty,omitempty"` } // DockerNetworkMode returns DefaultNetworkMode @@ -37,3 +40,12 @@ func DockerHostname(d *Docker) string { } return *d.Hostname } + +// DockerTty returns true if the build +// should allocate a pseudo tty +func DockerTty(d *Docker) string { + if d == nil { + return false + } + return d.TTY +}