-
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
tty: true
in docker-compose.yml no longer displays console output
#9288
Comments
Potentially related to #9201 |
This behavior started with Docker Compose v2.3.0. v2.2.3 was fine. I've verified this behavior change on Linux. |
…r in Docker Composer API 2.3.0 ref: docker/compose#9288
…r in Docker Composer API 2.3.0 ref: docker/compose#9288
…r in Docker Composer API 2.3.0 ref: docker/compose#9288
…r in Docker Composer API 2.3.0 ref: docker/compose#9288
I can also confirm this issue on Linux. I ran git bisect, and it seems to be introduced by 65ed8cf. |
…r in Docker Composer API 2.3.0 ref: docker/compose#9288
This is a frustrating fix. We use tty: true so we can attach to containers for interactive debugging, e.g. byebug in Ruby, but most of the time we also want to see container output without having to run a separate terminal window to follow the logs... |
hey guys, there are unwilling workaround...
we can see logs (colorlized) same as before. (BE CAREFUL TO CONFLICT CONTAINER PORT RUNNING WITH OTHER DETACHED CONTAINER) |
Setting tty to true for docker compose >= 2.3.x hides output written to stdout we want to see. We are not using interactive mode so it should be safe to remove. See: docker/compose#9288
On my end it seems that it causes more than just missing logs. I am building something with webpack in tty mode (so that I have colored logs) and it seems that webpack hangs when the build is completed and never starts the dev server. Not sure how to debug this, but it could be that webpack is trying to open the terminal and it hangs? |
esbuild also needs to set |
Can you please confirm this issue still applies to v2.4.0? |
@ndeloof the issue doesn't seem to be fixed with 2.4.0 (tested on a MBP M1) |
It didn't work for me on version 2.4.0 either, but it's now fixed with 2.4.1. |
Yes, 2.4.1 fixes this issue. |
I can also confirm, 2.4.1 fixes the issue! 🙌 Thanks for the fix! |
Not fixed for me on 2.4.1 :( How can I help debug? I am on macOS (docker desktop) I am running edit: nevermind. Turning it off and on again fixed the issue while I was trying to build a simple repro 🙃 . Thanks for the fix! |
I seem to still have this problem with docker-compose v2.29.7, although perhaps I'm doing something wrong:
...and here it hangs forever. Specifically, there is no bash shell coming up as expected. |
Expected behavior
Console output from services running that have
tty: true
in thedocker-compose.yml
will displayActual behavior
After updating to Docker Desktop / Mac 4.6.0 (75818), any services that have
tty: true
in thedocker-compose.yml
no longer displayThe containers are actually running just fine, and I can see the logs in the Docker Desktop application, but they are no longer visible in the console.
Removing the
tty: true
line from thedocker-compose.yml
file causes it to output as expectedI have both these Experimental features on:
...but turning them off and restarting Docker Desktop did not change the lack of logging
Information
Output of
/Applications/Docker.app/Contents/MacOS/com.docker.diagnose check
I have both these Experimental features on:
...but turning them off and restarting Docker Desktop did not change the lack of logging
Starting diagnostics
[PASS] DD0027: is there available disk space on the host?
[PASS] DD0028: is there available VM disk space?
[PASS] DD0031: does the Docker API work?
[PASS] DD0004: is the Docker engine running?
[PASS] DD0011: are the LinuxKit services running?
[FAIL] DD0016: is the LinuxKit VM running? vm is not running: vm has not started
[PASS] DD0001: is the application running?
[PASS] DD0018: does the host support virtualization?
[FAIL] DD0017: can a VM be started? vm has not started: vm has not started
[PASS] DD0015: are the binary symlinks installed?
[PASS] DD0003: is the Docker CLI working?
[PASS] DD0013: is the $PATH ok?
[PASS] DD0007: is the backend responding?
[PASS] DD0014: are the backend processes running?
[PASS] DD0008: is the native API responding?
[PASS] DD0009: is the vpnkit API responding?
[PASS] DD0010: is the Docker API proxy responding?
[PASS] DD0012: is the VM networking working?
[PASS] DD0032: do Docker networks overlap with host IPs?
[SKIP] DD0030: is the image access management authorized?
[PASS] DD0019: is the com.docker.vmnetd process responding?
[PASS] DD0033: does the host have Internet access?
Please investigate the following 1 issue:
1 : The test: can a VM be started?
Failed with: vm has not started: vm has not started
The Docker engine runs inside a Linux VM. Therefore we must be able to start Virtual Machines.
Steps to reproduce the behavior
tty: true
on a service in thedocker-compose.yml
docker-compose up
The text was updated successfully, but these errors were encountered: