Skip to content

Commit 5a347c3

Browse files
authored
fix: ctrl+c not work when running use docker container (#599)
Signed-off-by: Bob Du <[email protected]>
1 parent 4e5747d commit 5a347c3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Dockerfile

+6-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ COPY . /app
2222
RUN pnpm run build
2323

2424
# build backend
25-
FROM node:22-alpine as backend
25+
FROM node:22-alpine AS backend
2626

2727
RUN npm install pnpm@8 -g
2828

@@ -41,6 +41,8 @@ RUN pnpm build
4141
# service
4242
FROM node:22-alpine
4343

44+
RUN apk add --no-cache tini
45+
4446
RUN npm install pnpm@8 -g
4547

4648
WORKDIR /app
@@ -59,4 +61,6 @@ COPY --from=backend /app/build /app/build
5961

6062
EXPOSE 3002
6163

62-
CMD ["sh", "-c", "node --import tsx/esm ./build/index.js"]
64+
ENTRYPOINT ["/sbin/tini", "--"]
65+
66+
CMD ["node", "--import", "tsx/esm", "./build/index.js"]

0 commit comments

Comments
 (0)