Search code examples
dockervisual-studiodocker-composedevopsdocker-desktop

How to Monitoring Docker Compose Containers Logs in Docker Desktop


When I run the compose using the Visual Studio play button, it displays the information as I expected enter image description here

When I execute the compose using an automation script, the logs don't appear enter image description here

How can I enable this? I've tried adding tty: true for each container in the compose file, and running the docker-compose logs command, but none of them seem to work.


Solution

  • The recommended solution for this issue is to run the command docker-compose logs --follow. In most cases, this command will enable the live streaming of logs within the Docker Compose view in the Docker App for Windows. I have personally tested this approach and found it effective in resolving the problem.