Skip to content

Commit 4816cbe

Browse files
authored
Update to use tini in Dockerfile to propagate signals (#172)
* Update to use tini in Dockerfile to propagate signals * Update entrypoint in dev Dockerfile
1 parent 8bbab0b commit 4816cbe

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
FROM node:18.15.0-alpine AS base
22

3+
# Install tini
4+
RUN apk add --no-cache tini
5+
36
# Set the working directory
47
WORKDIR /app
58

9+
# Use tini as entrypoint to handle killing processes
10+
ENTRYPOINT ["/sbin/tini", "--"]
11+
612
# Install build dependencies
713
RUN apk --no-cache --virtual build-dependencies add g++ make py3-pip
814

@@ -38,6 +44,9 @@ CMD [ "yarn", "dev:worker" ]
3844
# Production stage
3945
FROM node:18.15.0-alpine AS prod
4046

47+
# Install tini
48+
RUN apk add --no-cache tini
49+
4150
# Set the working directory
4251
WORKDIR /app
4352

@@ -61,4 +70,6 @@ RUN yarn install --production=true --frozen-lockfile --network-timeout 1000000
6170
# Clean up build dependencies
6271
RUN apk del build-dependencies
6372

73+
# Use tini as entrypoint to handle killing processes
74+
ENTRYPOINT ["/sbin/tini", "--"]
6475
CMD [ "yarn", "start"]

0 commit comments

Comments
 (0)