From fda2395f3d73493dfaaf732ddf9a8b87c77f4757 Mon Sep 17 00:00:00 2001 From: Kerkesni Date: Thu, 19 Oct 2023 13:25:55 +0200 Subject: [PATCH] forward system signals to the node process using tini MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit npm run doesn’t handle signal forwarding and crashes on the SIGTERM signal sent by Kubernetes. Tini spawns a process at PID 1 that handles forwarding system signals to all it's child processes. Issur: BB-459 --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1420fb741..79bf75fba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,6 +40,7 @@ FROM node:${NODE_VERSION} RUN apt-get update && \ apt-get install -y --no-install-recommends \ jq \ + tini \ && rm -rf /var/lib/apt/lists/* WORKDIR /usr/src/app @@ -49,6 +50,6 @@ COPY . /usr/src/app COPY --from=builder /usr/src/app/node_modules ./node_modules/ COPY --from=builder /usr/local/bin/dockerize /usr/local/bin/ -ENTRYPOINT ["/usr/src/app/docker-entrypoint.sh"] +ENTRYPOINT ["tini", "--", "/usr/src/app/docker-entrypoint.sh"] EXPOSE 8900