eolas/zk/Viewing_Docker_logs.md

532 B

tags created
docker
procedural
Thursday, April 24, 2025

Viewing Docker logs

View logs from outside of container

docker logs <container_name> OR <container_id>

To view the logs in realtime, apend -f for --follow:

docker logs -f <container_name> OR <container_id>

View logs from within the container

For example, to view nginx logs, first enter into the container and then:

cat /var/log/nginx/access.log
cat /var/log/nginx/error.log