EN
Docker - show logs of container
2
points
Quick solution:
# follow short
docker logs -f <container_id>
# follow full
docker logs --follow <container_id>
# since
docker logs --since=42m <container_id>
docker logs --since=2h <container_id>
# to get <container_id> we use:
docker ps
Documentation:
Name, shorthand | Default | Description |
--details | Show extra details provided to logs | |
--follow , -f | Follow log output | |
--since | Show logs since timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes) | |
--tail , -n | all | Number of lines to show from the end of the logs |
--timestamps , -t | Show timestamps | |
--until | API 1.35+ Show logs before a timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes) |