Skip to content

get a wrong output when attach a container #36477

@frankLife

Description

@frankLife

Description
docker exec -it docker_container_id /bin/sh to attach a container displays wrong stdout when terminal window has a small height on mac
Iterm2:
image

mac terminal:

image

Steps to reproduce the issue:

  1. run docker exec -it docker_container_id /bin/sh in a small height terminal window
  2. run vim a file which the lines of content beyond the height(row)

Describe the results you received:
image
a vim wrong output that can't be operated

Describe the results you expected:
image

a right vim output

Additional information you deem important (e.g. issue happens only occasionally):
Sometimes it will works correctly.

Output of docker version:

17.12.0-ce

Output of docker info:

Containers: 27
 Running: 2
 Paused: 0
 Stopped: 25
Images: 33
Server Version: 17.12.0-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host ipvlan macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 89623f28b87a6004d4b785663257362d1658a729
runc version: b2567b37d7b75eb4cf325b77297b140ea686ce8f
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 4.9.60-linuxkit-aufs
Operating System: Docker for Mac
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 1.952GiB
Name: linuxkit-025000000001
ID: WGPS:RS5V:453Q:24YG:4QXJ:OBEG:3O5X:HXGS:TYYK:UZOX:FKVY:XJEQ
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: 44
 Goroutines: 59
 System Time: 2018-03-03T06:07:08.758847562Z
 EventsListeners: 2
HTTP Proxy: docker.for.mac.http.internal:3128
HTTPS Proxy: docker.for.mac.http.internal:3129
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
 127.0.0.0/8
Registry Mirrors:
 https://c1jslt50.mirror.aliyuncs.com/
Live Restore Enabled: false

Additional environment details (AWS, VirtualBox, physical, etc.):

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions