I run my jenkins as a docker container with command below
docker run \
-u root \
-p 8081:8080 \
-p 50000:50000 \
-v /data/jenkins-data:/var/jenkins_home \
-v /var/run/docker.sock:/var/run/docker.sock \
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?