OneBite.Dev - Coding blog in a bite size

show docker logs

Simple docker step by step how to show or print 10 or 100 or any number of logs

This is how you can print logs or output from your docker.

docker logs -f --tail $NUMBER $container_name
  • change $NUMBER with how many output you want to see
  • change $container_name with your container_name

To see the container_name run docker ps. Read list docker containers

Reference: Print X number of docker logs

docker