From 1d8b37eee0675ce5bdca431c3876c04a7ac62940 Mon Sep 17 00:00:00 2001 From: ssiergl <38670469+ssiergl@users.noreply.github.com> Date: Thu, 29 Apr 2021 18:13:41 +0200 Subject: [PATCH] Properly handle SIGTERM and other kernel events (#7230) * Properly handle SIGTERM and other kernel events see https://github.com/nodejs/docker-node/blob/main/docs/BestPractices.md#handling-kernel-signals * Update Dockerfile Co-authored-by: Koen Kanters --- docker/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 7a9e62dcd..9eafdad86 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,7 +1,7 @@ FROM node:14-alpine3.12 as base WORKDIR /app -RUN apk add --no-cache tzdata eudev +RUN apk add --no-cache tzdata eudev tini COPY package.json ./ @@ -30,4 +30,4 @@ ARG COMMIT RUN echo "{\"hash\": \"$COMMIT\"}" > .hash.json ENTRYPOINT ["docker-entrypoint.sh"] -CMD ["node", "index.js"] +CMD [ "/sbin/tini", "--", "node", "index.js"]