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 <koenkanters94@gmail.com>
This commit is contained in:
ssiergl
2021-04-29 18:13:41 +02:00
committed by GitHub
co-authored by Koen Kanters
parent 2b488ccff4
commit 1d8b37eee0
+2 -2
View File
@@ -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"]