Skip to content

[BUG] Terminal state not restored after non-plain docker compose output (prompt and cursor missing) #13449

@chimes-of-freedom

Description

@chimes-of-freedom

Description

After running any docker compose command that produces non-plain output (TTY / animated progress / emoji), the terminal is left in an incorrect state when the command exits.

After the command finishes:

  • Shell prompt is not displayed
  • Cursor is invisible
  • Subsequent input is rendered on the last output line, at the column where the prompt would normally start
  • Terminal does not advance to a new line

Steps To Reproduce

  1. running any docker compose command that produces non-plain output (TTY / animated progress / emoji)

Compose Version

v5.0.0

Docker Environment

Client: Docker Engine - Community
 Version:    29.1.3
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.30.1
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v5.0.0
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 1
  Running: 1
  Paused: 0
  Stopped: 0
 Images: 5
 Server Version: 29.1.3
 Storage Driver: overlay2
  Backing Filesystem: xfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 CDI spec directories:
  /etc/cdi
  /var/run/cdi
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 1c4457e00facac03ce1d75f7b6777a7a851e5c41
 runc version: v1.3.4-0-gd6d73eb8
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 5.14.0-570.58.1.el9_6.x86_64
 Operating System: Rocky Linux 9.7 (Blue Onyx)
 OSType: linux
 Architecture: x86_64
 CPUs: 20
 Total Memory: 7.476GiB
 Name: multi.sonnet.su
 ID: 160cfd53-c140-4fbb-82de-1c48ab9614f1
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  ::1/128
  127.0.0.0/8
 Registry Mirrors:
  https://docker.m.daocloud.io/
  https://docker.1ms.run/
 Live Restore Enabled: false
 Firewall Backend: iptables+firewalld

Anything else?

Running another docker compose command that also produces non-plain output restores the terminal to a normal state.

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