Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Unable to detach docker compose up after upgrading docker client #12594

Closed
jasonqsong opened this issue Feb 28, 2025 · 2 comments
Closed
Labels

Comments

@jasonqsong
Copy link

Description

With previous version, we run "docker compose up" to check the logs, ensure everything works fine, and press "ctrl-z" to detach the docker compose output and leave the server to run.

However, after upgrading the docker client, the docker compose up takes away the control of keyboard and leaves "w - Enable Watch" hint. It doesn't allow user to detach the output anymore with "ctrl-z" or "ctrl-p" + "ctrl-q". The only way to leave the container running is to close and reopen the terminal, which brings inconvinient to daily developing process.

Steps To Reproduce

  1. docker compose up
  2. see w Enable Watch
  3. try press "ctrl-z" or "ctrl-p" + "ctrl-q" nothing happens (should leave the container running and detach the output and return user to shell)
  4. no other keys are accept except "ctrl-c" (stop) or "w" (nothing happens)

Compose Version

Docker Compose version v2.29.7

Docker Environment


Anything else?

No response

@ndeloof
Copy link
Contributor

ndeloof commented Feb 28, 2025

A workaround is for you to run docker compose up --menu=false or set COMPOSE_MENU=false

@ndeloof
Copy link
Contributor

ndeloof commented Mar 3, 2025

After some investigation, when menu is enabled keyboard events are captured by Compose (bypassing your shell) so Ctrl+Z doesn't result into a SIGSTOP signal being send to process. While Compose can then detect this keyboard combination, there's no portable way to reproduce a process suspend routine as implemented by Go runtime. Sending SIGSTP internally to self just results into current go thread to hang, without returning to shell.

I'll close this issue as "not planned" as there's no portable solution. I hope proposed workaround works for you

@ndeloof ndeloof closed this as not planned Won't fix, can't repro, duplicate, stale Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants