EN
docker-compose - show current logs of all docker services
1
points
Hi, today I would like to share with you how to view current logs of all docker services started with docker-compose.
In order to show all current logs run this command in directory with docker-compose.yml:
docker-compose logs -t -f --tail 10
This command will show us last 10 lines of logs from each docker container.
If we have 3 docker containers configured in docker-compose with this command we will see 30 lines of logs, 10 lines of logs from each docker container.
https://docs.docker.com/compose/reference/logs/
Usage: logs [options] [SERVICE...]
Options:
--no-color Produce monochrome output.
-f, --follow Follow log output.
-t, --timestamps Show timestamps.
--tail="all" Number of lines to show from the end of the logs
for each container.