Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker containers with multiple log sources

Tags:

docker

Say I have a container that has everything I need to run my web application (such as https://github.com/grigio/docker-stringer for example). How would I go about inspecting the logs for the different services (web server, application server, database server)? With all of the tutorials so far I have only been able to view the logs for the specific command run when starting the container.

like image 619
Jon-Erik Avatar asked Oct 03 '22 10:10

Jon-Erik


1 Answers

One method would be to configure your logs to write to stdout and to use docker logs to retrieve them.

Another option would be to use a bindmount and link to your host file system.

like image 129
Nick Stinemates Avatar answered Oct 13 '22 11:10

Nick Stinemates