How to know the reason why my docker container exits?

by Adan   Last Updated June 13, 2019 07:01 AM

I run my jenkins as a docker container with command below

docker run \
-u root \
--rm \
-d \
-p 8081:8080 \
-p 50000:50000 \
-v /data/jenkins-data:/var/jenkins_home \
-v /var/run/docker.sock:/var/run/docker.sock \
jenkinsci/blueocean

From time to time, the jenkins container will exit. I even can't find it with "docker ps -a" command, so that I can't get any logs for troubleshooting.

Is there any way I can check the reason why a docker container exits like this?

Tags : docker jenkins


Related Questions


Updated April 25, 2019 10:01 AM

Updated June 18, 2019 15:01 PM

Updated June 18, 2018 14:01 PM

Updated July 19, 2018 09:01 AM

Updated August 27, 2019 03:01 AM