File tree Expand file tree Collapse file tree 1 file changed +6
-19
lines changed
Expand file tree Collapse file tree 1 file changed +6
-19
lines changed Original file line number Diff line number Diff line change 11# Install dependencies only when needed
2- FROM node:18 AS deps
2+ FROM node:22 AS deps
33# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
44WORKDIR /app
55
6- RUN npm i -g pnpm
7-
86# Install dependencies based on the preferred package manager
9- COPY package.json pnpm-lock.yaml ./
10- RUN pnpm i --frozen-lockfile
11-
12- FROM node:18 AS toolkit
13- WORKDIR /app
14- COPY --from=deps /app/node_modules ./node_modules
15- COPY . .
16-
17- ENTRYPOINT ["scripts/docker-entrypoint-toolkit.sh" ]
7+ COPY package.json package-lock.json ./
8+ RUN npm install
189
1910# Rebuild the source code only when needed
20- FROM node:18 AS builder
11+ FROM node:22 AS builder
2112WORKDIR /app
2213COPY --from=deps /app/node_modules ./node_modules
2314COPY . .
@@ -28,17 +19,13 @@ COPY . .
2819# ENV NEXT_TELEMETRY_DISABLED 1
2920
3021# If using npm comment out above and use below instead
31- RUN PRISMA_BINARIES_MIRROR=http://prisma-builds.s3-eu-west-1.amazonaws.com npx prisma generate
32- ENV NODE_ENV production
33- RUN npx tsc && npm run build
22+ RUN npm run build
3423
3524# Production image, copy all the files and run next
36- FROM node:18 AS runner
25+ FROM node:22 AS runner
3726WORKDIR /app
3827
3928ENV NODE_ENV production
40- # Uncomment the following line in case you want to disable telemetry during runtime.
41- # ENV NEXT_TELEMETRY_DISABLED 1
4229
4330RUN addgroup --system --gid 1001 nodejs
4431RUN adduser --system --uid 1001 nextjs
You can’t perform that action at this time.
0 commit comments