// resizeTtyTo resizes tty to specific height and width func resizeTtyTo(ctx context.Context, client apiclient.ContainerAPIClient, id string, height, width int, isExec bool) { if height == 0 && width == 0 { return } options := types.ResizeOptions{ Height: height, Width: width, } var err error if isExec { err = client.ContainerExecResize(ctx, id, options) } else { err = client.ContainerResize(ctx, id, options) } if err != nil { logrus.Debugf("Error resize: %s", err) } }