Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

fix(server): handle kernel signals by including tini #1388

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,14 @@ RUN NODE_ENV=production npm run build && \
mv /opt/build/bundle.integrity.manifest.json /opt/one-app/production && \
mv /opt/build/.build-meta.json /opt/one-app/production

# https://github.com/nodejs/docker-node/blob/main/docs/BestPractices.md#handling-kernel-signals
FROM node:18.20.1-alpine as node-tini
RUN apk add --no-cache tini
ENTRYPOINT ["/sbin/tini", "--"]

# development image
# docker build . --target=development
FROM node:18.20.1-alpine as development
FROM node-tini as development
ARG USER
ENV USER ${USER:-node}
ENV NODE_ENV=development
Expand All @@ -47,7 +52,7 @@ COPY --from=builder --chown=node:node /opt/one-app/development ./

# production image
# last so that it's the default image artifact
FROM node:18.20.1-alpine as production
FROM node-tini as production
ARG USER
ENV USER ${USER:-node}
ENV NODE_ENV=production
Expand Down
Loading