User Tools

Site Tools


Sidebar

Translations of this page:



最近の更新



Tag Cloud

en:50_dialy:2023:06:17

Jun 17 2023 Docker logs tail

Up until now, when looking at logs in Docker, I did it like this:

In this case, since all past logs are displayed first, and then it becomes a tail -f state, it takes a long time to display the latest logs when there are a large number of logs, which can be quite inconvenient.

docker logs -f [container]

how to

With this method, the latest 10 logs are displayed immediately.
This is convenient! 😊

docker logs --tail 10 -f [container]
docker-compose --tail 10 -f
en/50_dialy/2023/06/17.txt · Last modified: 2023/06/21 08:24 by matsui