We have setup Jenkins as a docker container in our infra. We recently upgraded Jenkins from
jenkins/jenkins:2.177 to jenkins/jenkins:2.331 version. After the upgrade we see an strange issue (We have never faced this issue with previous installed version). The issue is - After every 24 hrs, Jenkins container gets restarted automatically without anything in logs (Someday it does not but mostly everyday).
I checked everywhere in Jenkins, there’s no place where I could find and schedule restart policy. And during this restart of Jenkins docker container, all my running jobs gets lost (Basically the restart does not wait for any Jenkins job to finish), we do no even find the build history of that execution. I in-fact can see the build number in JENKINS_HOME/jobs/${jobname}/builds/ but I cannot see that build number on Jenkins console.
I am not sure if this is happening because of DockerContainerWatchdog or something else (I tried this solution - Jenkins: How to disable DockerContainerWatchdog from running - Stack Overflow but it didn’t work), this is happening only in case of Jenkins container only (My machine/instance is running few other containers too but only Jenkins container gets restarted every 24hrs).
Could you please help me understand why this is happening ? How can I stop this Jenkins container restart.