diff options
author | Antonio Murdaca <runcom@users.noreply.github.com> | 2016-09-21 09:53:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-21 09:53:39 +0200 |
commit | b683958deeaae20463649085516d57df2fbdec53 (patch) | |
tree | 95ea3020f2af396b687d2561cdd55392b6e2649c | |
parent | 2a3205d7b770fec0eb1f8d90c5342f98a12a74a1 (diff) | |
parent | 6b74e2f09dfe2627cd639d683e0896b938f38313 (diff) | |
download | docker-b683958deeaae20463649085516d57df2fbdec53.tar.gz |
Merge pull request #26751 from Microsoft/jjh/reverthostconfig
Revert Box from HostConfig
-rw-r--r-- | api/types/container/host_config.go | 8 | ||||
-rw-r--r-- | cli/command/container/run.go | 2 | ||||
-rw-r--r-- | daemon/oci_windows.go | 4 |
3 files changed, 4 insertions, 10 deletions
diff --git a/api/types/container/host_config.go b/api/types/container/host_config.go index cbbfc10807..9f4ada250b 100644 --- a/api/types/container/host_config.go +++ b/api/types/container/host_config.go @@ -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 -} diff --git a/cli/command/container/run.go b/cli/command/container/run.go index a167e78f9a..d36ab610cf 100644 --- a/cli/command/container/run.go +++ b/cli/command/container/run.go @@ -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()) diff --git a/daemon/oci_windows.go b/daemon/oci_windows.go index e2e46ed675..ee198a4e44 100644 --- a/daemon/oci_windows.go +++ b/daemon/oci_windows.go @@ -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 |