I know you can check the logs of a running container with:
Command to list containers
docker container ls
Command to view the logs
docker logs [container-id]
Question:
Can you also check the logs of a failed container that is not listed, because the container failed?
Answer:
Command to list all containers, including failed / crashed containers:
docker ps -a
Now you will be able to find the id / name of your failed container and run the following command to check it's logs:
docker logs [container-id]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With