diff options
author | Paweł Gronowski <pawel.gronowski@docker.com> | 2022-05-12 14:54:44 +0200 |
---|---|---|
committer | Paweł Gronowski <pawel.gronowski@docker.com> | 2022-05-19 07:57:27 +0200 |
commit | 85a7f5a09af9c2d387c89df4d9de61c4322a2843 (patch) | |
tree | fcaa79645c8c65f160906fd5a6c5ef4636cdb057 /integration/internal | |
parent | 1a0587bd766e3ab1f6dbe808a94a41a2f54d9126 (diff) | |
download | docker-85a7f5a09af9c2d387c89df4d9de61c4322a2843.tar.gz |
daemon/linux: Set console size on creation
On Linux the daemon was not respecting the HostConfig.ConsoleSize
property and relied on cli initializing the tty size after the container
was created. This caused a delay between container creation and
the tty actually being resized.
This is also a small change to the api description, because
HostConfig.ConsoleSize is no longer Windows-only.
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Diffstat (limited to 'integration/internal')
-rw-r--r-- | integration/internal/container/ops.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/integration/internal/container/ops.go b/integration/internal/container/ops.go index 0a600361aa..0d94a4ebf7 100644 --- a/integration/internal/container/ops.go +++ b/integration/internal/container/ops.go @@ -227,3 +227,10 @@ func WithIsolation(isolation containertypes.Isolation) func(*TestContainerConfig c.HostConfig.Isolation = isolation } } + +// WithConsoleSize sets the initial console size of the container +func WithConsoleSize(width, height uint) func(*TestContainerConfig) { + return func(c *TestContainerConfig) { + c.HostConfig.ConsoleSize = [2]uint{height, width} + } +} |