I run my jenkinsJenkins as a dockerDocker container with the 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
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?