mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Revert Box from HostConfig
Signed-off-by: John Howard <jhoward@microsoft.com>
This commit is contained in:
parent
ef728a1641
commit
6b74e2f09d
3 changed files with 4 additions and 10 deletions
|
@ -313,7 +313,7 @@ type HostConfig struct {
|
|||
Runtime string `json:",omitempty"` // Runtime to use with this container
|
||||
|
||||
// Applicable to Windows
|
||||
ConsoleSize Box // Initial console size
|
||||
ConsoleSize [2]uint // Initial console size (height,width)
|
||||
Isolation Isolation // Isolation technology of the container (eg default, hyperv)
|
||||
|
||||
// Contains container's resources (cgroups, ulimits)
|
||||
|
@ -325,9 +325,3 @@ type HostConfig struct {
|
|||
// Run a custom init inside the container, if null, use the daemon's configured settings
|
||||
Init *bool `json:",omitempty"`
|
||||
}
|
||||
|
||||
// Box specifies height and width dimensions. Used for sizing of a console.
|
||||
type Box struct {
|
||||
Height uint
|
||||
Width uint
|
||||
}
|
||||
|
|
|
@ -135,7 +135,7 @@ func runRun(dockerCli *command.DockerCli, flags *pflag.FlagSet, opts *runOptions
|
|||
// a far better user experience rather than relying on subsequent resizes
|
||||
// to cause things to catch up.
|
||||
if runtime.GOOS == "windows" {
|
||||
hostConfig.ConsoleSize.Height, hostConfig.ConsoleSize.Width = dockerCli.Out().GetTtySize()
|
||||
hostConfig.ConsoleSize[0], hostConfig.ConsoleSize[1] = dockerCli.Out().GetTtySize()
|
||||
}
|
||||
|
||||
ctx, cancelFun := context.WithCancel(context.Background())
|
||||
|
|
|
@ -71,8 +71,8 @@ func (daemon *Daemon) createSpec(c *container.Container) (*libcontainerd.Spec, e
|
|||
s.Process.Cwd = `C:\`
|
||||
}
|
||||
s.Process.Env = c.CreateDaemonEnvironment(linkedEnv)
|
||||
s.Process.ConsoleSize.Height = c.HostConfig.ConsoleSize.Height
|
||||
s.Process.ConsoleSize.Width = c.HostConfig.ConsoleSize.Width
|
||||
s.Process.ConsoleSize.Height = c.HostConfig.ConsoleSize[0]
|
||||
s.Process.ConsoleSize.Width = c.HostConfig.ConsoleSize[1]
|
||||
s.Process.Terminal = c.Config.Tty
|
||||
s.Process.User.Username = c.Config.User
|
||||
|
||||
|
|
Loading…
Reference in a new issue