When running the official Jenkins docker image I expect Jenkins to respond to a SIGTERM event from Docker (docker stop) by gracefully shutting down the server.
If I do this...
I would expect Jenkins to shutdown gracefully just like if I'd called <jenkins-url>/stop. Instead, the container just exits.
The exact same thing happens if you try using docker stop command.
This is causing problems for me running Jenkins in AWS ECS. When I have a new Jenkins container I want to deploy, ECS will issue a stop command to the running container before starting the new container. The running Jenkins container will not stop gracefully and when the new container starts I have a lock problem because of the previous dirty exit.
I am marking this as major as this behaviour is deviating from what is documented here. where it says:
Sending a SIGTERM/SIGINT to Jenkins will trigger a graceful shutdown.