Enable pseudo tty setting

This commit is contained in:
Brad Rydzewski 2015-07-02 14:50:17 -07:00
parent f797b2c513
commit 20693cd38d

View file

@ -14,6 +14,9 @@ type Docker struct {
// Hostname (also known as `--hostname` option) // Hostname (also known as `--hostname` option)
// Could be set only if Docker is running in privileged mode // Could be set only if Docker is running in privileged mode
Hostname *string `yaml:"hostname,omitempty"` Hostname *string `yaml:"hostname,omitempty"`
// Allocate a pseudo-TTY (also known as `--tty` option)
TTY bool `yaml:"tty,omitempty"`
} }
// DockerNetworkMode returns DefaultNetworkMode // DockerNetworkMode returns DefaultNetworkMode
@ -37,3 +40,12 @@ func DockerHostname(d *Docker) string {
} }
return *d.Hostname 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
}