Show Docker container logs

Written by
Date: 2020-07-20 15:15:32 00:00

If you need to check the logs of a Docker compose created container, just go to the folder where the docker-compose.yml file is and run these commands.

docker-compose ps

That will have an output like this:

Name              Command               State                                                  Ports
mail   supervisord -c /etc/superv ...   Up      110/tcp, 143/tcp,>25/tcp, 4190/tcp,>465/tcp,>587/tcp, 993/tcp,

Now we know the container name, (mail in this case)

So we can run:

docker-compose logs mail


docker-compose -f logs mail