View container logs

To view the container logs, follow the steps below:

  • Get the container ID. You can get this ID in one of two ways:
    • sudo watch -n 5 'docker ps'
    • sudo docker ps | grep [container name]. Example docker ps | grep ldap
  • To see the logs, do the following:
sudo docker logs [ container id]


sudo docker logs [container id] --follow