emqx-docker icon indicating copy to clipboard operation
emqx-docker copied to clipboard

Add in tini for proper signal propogation inside docker

Open HackToHell opened this issue 6 years ago • 1 comments

  • [x] I have thoroughly tested my contribution.
  • [x] The code changes are reflected in the documentation README.md.

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).

HackToHell avatar Aug 08 '18 12:08 HackToHell

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

spring2maz avatar Sep 23 '18 18:09 spring2maz