How to know the reason why a docker container exits?
I have a Docker container running in a host of 1G RAM (there are also other containers running in the same host). The application in this Docker container will decode some images, which may consume memory a lot. From time to time, this container will exit. I doubt it is due to out of memory but not very sure. I need a method to find the root cause. So is there any way to know what happened for this container's death? Others have mentioned docker logs $container_id to view the output of the application. This would always be my first thing to check. Next, you can run a docker inspect $container