emqxarchive / emqx-docker

This repository is no longer maintained, please go to https://github.com/emqx/emqx-rel/tree/master/deploy/docker
Apache License 2.0
235 stars 162 forks source link

Add in tini for proper signal propogation inside docker #68

Open HackToHell opened 6 years ago

HackToHell commented 6 years ago

The change adds TINI, an init manager to the docker container, this ensures that when docker stop is called, the signal gets properly propagated to the erlang process, right now only the shell script got the signal and it didn't do anything about it(resulting in a sigkill after a timeout).

With this change the erlang process will get the SIGTERM and properly shutdown.(Needs to be handled inside emqttd)

TINI was used over other init systems because it's extremely small and does the job well. (Docker uses this if you use the --init option).

spring2maz commented 5 years ago

we should merge this! (maybe after a rebase on emqx30) ping @turtleDeng