Skip to content

Commit

Permalink
Properly handle SIGTERM and other kernel events (Koenkk#7230)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
ssiergl and Koenkk authored Apr 29, 2021
1 parent 2b488cc commit 1d8b37e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 ./

Expand Down Expand Up @@ -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"]

0 comments on commit 1d8b37e

Please sign in to comment.