Add tini for handling signals appropriately

This is a short-term workaround while we wait for upstream to implement proper handling of SIGTERM.
This commit is contained in:
Tianon Gravi 2015-07-24 13:24:19 -07:00
parent 9374efb2bf
commit bb91e64b56
2 changed files with 7 additions and 1 deletions

View File

@ -13,6 +13,12 @@ RUN curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/dow
&& rm /usr/local/bin/gosu.asc \
&& chmod +x /usr/local/bin/gosu
# grab tini for signal processing and zombie killing
RUN set -x \
&& curl -fSL "https://github.com/krallin/tini/releases/download/v0.5.0/tini" -o /usr/local/bin/tini \
&& chmod +x /usr/local/bin/tini \
&& tini -h
# Add the officially endorsed Erlang debian repository:
# See:
# - http://www.erlang.org/download.html

View File

@ -57,7 +57,7 @@ if [ "$1" = 'rabbitmq-server' ]; then
fi
chown -R rabbitmq /var/lib/rabbitmq
set -- gosu rabbitmq "$@"
set -- gosu rabbitmq tini -- "$@"
fi
exec "$@"