Skip to content

Commit

Permalink
22 seems to crash. need dev packages during build
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Sep 8, 2024
1 parent 93423f7 commit f1ea90b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# syntax=docker/dockerfile:1

# cacheble npm install stage that only reruns if package.json actually changes.
FROM node:22 AS builder
FROM node:21 AS builder

ENV NODE_ENV=production

WORKDIR /app

COPY ["package.json", "package-lock.json*", "./"]


RUN NODE_ENV=production npm install
#will later be pruned
RUN NODE_ENV=development npm install

COPY . .

Expand All @@ -19,7 +19,7 @@ RUN npm run build
RUN npm prune --production

# final stage
FROM node:22 AS final
FROM node:21 AS final
ENV NODE_ENV=production

WORKDIR /app
Expand Down

0 comments on commit f1ea90b

Please sign in to comment.