Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Dockerfile): use node v22.14 LTS #2488

Merged
merged 1 commit into from
Mar 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM node:20.11@sha256:357deca6eb61149534d32faaf5e4b2e4fa3549c2be610ee1019bf340ea8c51ec AS deps
FROM node:22.14@sha256:bac8ff0b5302b06924a5e288fb4ceecef9c8bb0bb92515985d2efdc3a2447052 AS deps
WORKDIR /app

# Install dependencies based on the preferred package manager
COPY package.json package-lock.json* ./
RUN npm ci

# Rebuild the source code only when needed
FROM node:20.11@sha256:357deca6eb61149534d32faaf5e4b2e4fa3549c2be610ee1019bf340ea8c51ec AS builder
FROM node:22.14@sha256:bac8ff0b5302b06924a5e288fb4ceecef9c8bb0bb92515985d2efdc3a2447052 AS builder
WORKDIR /app
ARG APP_DEPLOYMENT=INCIDENT_MANAGER
ARG WITHOUT_AUTH=false
Expand All @@ -19,6 +19,7 @@ ENV BACKEND_URL="/__BACKEND_URL__"
ENV NEXT_TELEMETRY_DISABLED=1
ENV NEXT_PUBLIC_APP_DEPLOYMENT=${APP_DEPLOYMENT}
ENV NEXT_PUBLIC_WITHOUT_SESSION=${WITHOUT_AUTH}
ENV NODE_OPTIONS="--max-old-space-size=4096"
RUN NEXT_STANDALONE_DEPLOYMENT=true npm run build

# NextJS compiles routes-manifest.json at build time. Which means, it won't
Expand All @@ -28,7 +29,7 @@ RUN NEXT_STANDALONE_DEPLOYMENT=true npm run build
RUN cp .next/routes-manifest.json .next/routes-manifest.orig.json

# Production image, copy all the files and run next
FROM node:20.11@sha256:357deca6eb61149534d32faaf5e4b2e4fa3549c2be610ee1019bf340ea8c51ec AS runner
FROM node:22.14@sha256:bac8ff0b5302b06924a5e288fb4ceecef9c8bb0bb92515985d2efdc3a2447052 AS runner
WORKDIR /app

ENV NEXT_PUBLIC_APP_DEPLOYMENT=${APP_DEPLOYMENT}
Expand Down