Enable pseudo tty setting
This commit is contained in:
parent
f797b2c513
commit
20693cd38d
1 changed files with 12 additions and 0 deletions
|
@ -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
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue