-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
docker compose run
hangs indefinitely if stdout/err were duplicated to a file
#8908
Comments
@ndeloof @ulyssessouza Any chance you could triage this issue? 🙇♂️ |
Hello @chadwhitacre. Thank you for reporting this issue and the test case. This helps a lot to understand the problem. Actually it doesn't hang. What happens is that the output asking for the entry is not printed. |
Thanks for taking a look @ulyssessouza. If I type something and hit Return after seeing the "Aaaaaaaaaaaaaaand ..." output (i.e., where the fourth prompt should be), I don't seem to get anywhere. I never get a prompt back and the docker process continues to run. Here's a video of what I'm seeing (yes I'm bashing away on the keyboard while the "Aaaaaaaaaaaaaaand ..." is up ;): repro.mp4 |
tested on recent codebase: ➜ docker-compose run --rm testing
Program: hello
Greetings, hello! I guess this has been fixed already! could you please confirm? |
@ndeloof The repro you show doesn't include the stdout/err redirect from the test case. Did you test it with that?
With a newer version of Docker Compose, 2.2.1 vs. 2.0.0, I get @ulyssessouza's result, where stdout (err?) is not displayed to the user but stdin still works. That's better! :) How to get stdout/err, though? 🤔 My repro results with 2.2.1
|
Description
We have a
self-hosted
repo where we provide a Dockerized version of our application for small installs. Our install script for this repo is fairly involved, and one of the things we do is capture stdout/stderr in a file to aid in debugging installation issues:Straightforward enough, and it works fine with Docker Compose v1.
With Docker Compose v2, we're seeing that— following the logging capture—a
docker compose run
invocation that prompts for input will hang indefinitely, and can't be killed with Ctrl-C either. I've whittled down a test case.Steps to reproduce the issue:
which docker-compose
resolves to Docker Compose v1.which docker
resolves to a Docker with Compose v2../test.sh
Describe the results you received:
The test script accepts three prompts, then hangs.
Describe the results you expected:
The test script accepts four prompts, then exits cleanly.
Output of
docker compose version
:Output of
docker info
:The text was updated successfully, but these errors were encountered: