I have Dockerized a sample app and have configured it to log to STDOUT. I then run the container without specifying a logging-driver
. According to the Docker docs, STDOUT should be collected out of the container and into a JSON file...
But nowhere in the logging docs do they tell you where you can find this JSON file!!!
Any ideas how I could find this file on my host and inspect its contents?
docker inspect
is your friend to figure out details regarding a container. With this you can get the log path by running following command:
$ docker inspect --format='{{.LogPath}}' NAME|ID
For example:
$ docker inspect --format='{{.LogPath}}' 2de7566c47eb
Hope it helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With