Skip to content

Commit 30f65ee

Browse files
committed
Simpler Dockerfile for now
Signed-off-by: David Gageot <[email protected]>
1 parent 88f650c commit 30f65ee

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

Dockerfile

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
1-
FROM node:23.11-slim AS node_base
1+
FROM node:23.11-slim AS builder
22
WORKDIR /app
3-
4-
FROM node_base AS builder
53
RUN npm install -g typescript shx
64

7-
COPY package.json yarn.lock tsconfig.json ./
8-
RUN --mount=type=cache,target=/usr/local/share/.cache/yarn yarn install --ignore-scripts --omit-dev
9-
105
COPY . ./
11-
RUN --mount=type=cache,target=/usr/local/share/.cache/yarn tsc && shx chmod +x dist/*.js
6+
RUN --mount=type=cache,target=/root/.npm npm install
127

13-
FROM node_base
14-
COPY package.json yarn.lock ./
15-
COPY --from=builder /app/dist ./dist
16-
ENV NODE_ENV=production
17-
RUN --mount=type=cache,target=/usr/local/share/.cache/yarn yarn install --ignore-scripts --omit-dev
188
ENTRYPOINT ["node", "/app/dist/index.js"]

0 commit comments

Comments
 (0)