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 shows logs despite setting the logging driver to none #9872
Comments
I believe this is working as expected. Standard output from containers is always shown when you run them in the foreground; setting the logging driver affects how |
I've a docker compose with 2 services. One is running some tests in .Net and the other spins up a database which is required for the tests to run. On the previous version of Docker Desktop and using the none driver, I was able to hide database logs and show only the logs from the test service. |
compose v2 uses |
Closing this issue as "fixed with a workaround" : while this has been used by many, setting logging driver to |
the workaround requires passing a CLI flag every call whereas this issue was about a declarative option that no longer works and also doesn't error upon being used |
@nektro see compose-spec/compose-spec#366 previous option was not a documented feature but a hack relying on docker-compose v1 implementation details, this will make this an explicit feature |
Description
Docker compose won't respect the logging driver setting and will show logs despite setting it to none.
Steps to reproduce the issue:
docker-compose.yaml
filedocker-compose up
ordocker compose up
Describe the results you received:
Despite setting the logging driver to none I can see logs printed in the console
Describe the results you expected:
I expected no logs to be printed from postgres service.
Additional information you deem important (e.g. issue happens only occasionally):
This issue occurred only after I updated to the latest version of Docker Desktop.
When I run the command with the
-d
argument and using thedocker logs
command thenone
logging driver works as expected and no logs are printed.Output of
docker compose version
:Output of
docker info
:Additional environment details:
The text was updated successfully, but these errors were encountered: