From 1f813a2138f6fec4ffd931db465bebdf3fd4e885 Mon Sep 17 00:00:00 2001 From: "R. Richard" Date: Tue, 27 Aug 2019 13:13:33 +0200 Subject: [PATCH] Add minimal init system to container --- Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Dockerfile b/Dockerfile index b3bd3b3..d14cc40 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,11 @@ RUN curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - COPY requirements.txt /tmp RUN pip3 install -r /tmp/requirements.txt +RUN curl -Ls https://github.com/krallin/tini/releases/download/v0.18.0/tini-amd64 --output /bin/init &&\ + echo "12d20136605531b09a2c2dac02ccee85e1b874eb322ef6baf7561cd93f93c855 /bin/init" |\ + sha256sum --check --status &&\ + chmod 755 /bin/init + ENV TFW_PUBLIC_PORT=8888 \ TFW_WEB_PORT=4242 \ TFW_LOGIN_APP_PORT=6666 \ @@ -73,4 +78,5 @@ ONBUILD RUN test -z "${NOFRONTEND}" && cd /data && yarn install --frozen-lockfil ONBUILD RUN test -z "${NOFRONTEND}" && cd /data && yarn build --no-progress || : ONBUILD RUN test -z "${NOFRONTEND}" && mv /data/dist ${TFW_FRONTEND_DIR} && rm -rf /data || : +ENTRYPOINT ["/bin/init", "--"] CMD exec supervisord --nodaemon --configuration ${TFW_SUPERVISORD_CONF}