Skip to content

Docker Exec does not resize terminal #35407

@thaJeztah

Description

@thaJeztah

I noticed this on both master (and docker 17.11-rc2, both on Ubuntu and Docker for Mac);

Client:
 Version:      17.11.0-ce-rc2
 API version:  1.34
 Go version:   go1.8.3
 Git commit:   d7062e5
 Built:        Wed Nov  1 22:11:59 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.11.0-ce-rc2
 API version:  1.34 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   d7062e5
 Built:        Wed Nov  1 22:10:29 2017
 OS/Arch:      linux/amd64
 Experimental: false

When running docker exec, the terminal doesn't resize:

$ docker run -d --name foo nginx:alpine
$ docker exec -it foo sh
/ # 0123456789012345678901234567890123456789012345678901234567890123456789012345
6789

Checking the size with stty size does show the correct dimensions:

/ # stty size
93 410

This only happens on docker exec; doing docker run -it works correct:

$ docker run -it --rm nginx:alpine sh
/ # 01234567890123456789012345678901234567890123456789012345678901234567890123456789

(and shows the same output for stty size):

/ # stty size
93 410

Checking the daemon logs, the resize parameters are passed to the API for both docker run and docker exec;

time="2017-11-04T00:17:19.801321056Z" level=debug msg="Calling POST /v1.34/containers/378120448a6af3b289c12574445dde6f7a5a8f6fb09a311a46d1ffc735fab010/resize?h=93&w=410"


time="2017-11-04T00:16:37.697677138Z" level=debug msg="Calling POST /v1.34/exec/c57124724228e4af259281af94206ce9f02c64e472408198f665b342c1347f03/resize?h=93&w=410"

ping @vieux @mlaventure @crosbymichael

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/runtimeRuntimekind/bugBugs are bugs. The cause may or may not be known at triage time so debugging may be needed.platform/desktopversion/17.11

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions