Handling docker stop signals properly
If you are starting your dockerized application from an ENTRYPOINT or a CMD you might have noticed that the application simply gets killed after 10 seconds of issuing a docker stop
command on the container. This happens because your application does not get a chance to process the SIGTERM signal issued by docker.