github.com/clintkitson/docker@v1.9.1/daemon/resize.go (about) 1 package daemon 2 3 // ContainerResize changes the size of the TTY of the process running 4 // in the container with the given name to the given height and width. 5 func (daemon *Daemon) ContainerResize(name string, height, width int) error { 6 container, err := daemon.Get(name) 7 if err != nil { 8 return err 9 } 10 11 return container.Resize(height, width) 12 } 13 14 // ContainerExecResize changes the size of the TTY of the process 15 // running in the exec with the given name to the given height and 16 // width. 17 func (daemon *Daemon) ContainerExecResize(name string, height, width int) error { 18 ExecConfig, err := daemon.getExecConfig(name) 19 if err != nil { 20 return err 21 } 22 23 return ExecConfig.resize(height, width) 24 }