I am running several containers using docker-compose
. I can see application logs with command docker-compose logs
. However I would like to access raw log file to send it somewhere for example? Where is it located? I guess it's separate log per each container (inside container?) but where I can find it?
相关问题
- Docker task in Azure devops won't accept "$(pw
- Unable to run mariadb when mount volume
- Unspecified error (0x80004005) while running a Doc
- What would prevent code running in a Docker contai
- How to reload apache in php-apache docker containe
As of 8/22/2018, the logs can be found in :
To directly view the logfile in less, I use:
run as ./viewLogs.sh CONTAINERNAME
To see how much space each container's log is taking up, use this:
You can
docker inspect
each container to see where their logs are:And, in case you were trying to figure out where the logs were to manage their collective size, or adjust parameters of the logging itself you will find the following relevant.
Fixing the amount of space reserved for the logs
This is taken from Request for the ability to clear log history (issue 1083)):
(note that in both syntaxes, the numbers are expressed as strings, in quotes)
Possible issue with
docker-compose logs
not terminatinglogs
doesn't exit if the container is already stoppedA container's logs can be found in :
(if you use the default log format which is json)