-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
Description
The upcoming docker 1.9 release will add support for defining the default stop signal sent by docker stop:
- At run time through the
--stop-signaloption added todocker run - At build time through the
STOPkeyword in theDockerfilesyntax.
Prior to this addition, alternative signals had to be sent using docker kill -s with the desired signal. (I feel this information should be added to the docker hub documentation for the official nginx images) considering nginx expects SIGQUIT for graceful shut down while docker stop sends SIGTERM by default (causing a fast shutdown by default and not a gracefull shutdown).
As detailed in the nginx documentation here:
| Signal | master process action |
|---|---|
| TERM, INT | fast shutdown |
| QUIT | graceful shutdown |
| HUP | changing configuration, keeping up with a changed time zone (only for FreeBSD and Linux), starting new worker processes with a new configuration, graceful shutdown of old worker processes |
| USR1 | re-opening log files |
| USR2 | upgrading an executable file |
| WINCH | graceful shutdown of worker processes |