11# Install dependencies only when needed
2- FROM node:23 -alpine AS deps
2+ FROM node:24 -alpine AS deps
33# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
44RUN apk add --no-cache libc6-compat
55WORKDIR /app
1515
1616
1717# Rebuild the source code only when needed
18- FROM node:23 -alpine AS builder
18+ FROM node:24 -alpine AS builder
1919WORKDIR /app
2020COPY . .
2121
@@ -27,18 +27,16 @@ RUN yarn build
2727# RUN npm run build
2828
2929# Production image, copy all the files and run next
30- FROM node:23 -alpine AS runner
30+ FROM node:24 -alpine AS runner
3131WORKDIR /app
3232
33- ENV NODE_ENV production
33+ ENV NODE_ENV= production
3434# Uncomment the following line in case you want to disable telemetry during runtime.
35- ENV NEXT_TELEMETRY_DISABLED 1
35+ ENV NEXT_TELEMETRY_DISABLED= 1
3636
3737RUN addgroup --system --gid 1001 nodejs
3838RUN adduser --system --uid 1001 nextjs
3939
40- # COPY --from=builder /app/public ./public
41-
4240# Automatically leverage output traces to reduce image size
4341# https://nextjs.org/docs/advanced-features/output-file-tracing
4442COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
@@ -49,6 +47,6 @@ USER nextjs
4947
5048EXPOSE 3000
5149
52- ENV PORT 3000
50+ ENV PORT= 3000
5351
5452CMD ["node" , "server.js" ]
0 commit comments