Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Propagate SIGTERM for graceful shutdown
If the process receiving the signal is PID 1, it gets special treatment by the kernel; if it hasn't registered a handler for the signal, the kernel won't fall back to default behavior, and nothing happens. Prior to this patch, the entrypoint script is PID 1 in the container, and by default, shell does not register SIGTERM handler. As a result, `docker stop` will not work properly when trying to gracefully shutdown the container. This patch adds `tini` to be the PID 1 in the container to do PID 1 things, and correctly propagate the SIGTERM signal.
- Loading branch information