From 1f6a56a991317a88f9687d93e923f0755688c99a Mon Sep 17 00:00:00 2001 From: YektaY Date: Tue, 17 Nov 2026 16:18:47 -0800 Subject: [PATCH] Build the image on Node 26 LTS and nginx 1.31 Dependabot's #194 moves the build stage to node:25-alpine, and the image build fails there: Node 25 no longer bundles corepack, so `corepack enable` is not found. Node 25 is also past end of life (2026-06-01), and the current corepack (0.36.0) doesn't support it. Use node:26-alpine, the active LTS, and install corepack 0.36.0 from npm before enabling it, so pnpm still comes from packageManager. Take #194's nginx 1.31 bump as well. --- docker/Dockerfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 7ce20ad..a4eb397 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,9 +1,12 @@ -FROM node:24-alpine AS build +# Node LTS majors only (even numbers): odd majors get about eight months of support. +FROM node:26-alpine AS build WORKDIR /app COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./ -RUN corepack enable && pnpm install --frozen-lockfile +# Node 25 and later don't bundle corepack, so install it from npm. Corepack then +# runs the pnpm version that package.json's packageManager names. +RUN npm install -g corepack@0.36.0 && corepack enable && pnpm install --frozen-lockfile COPY . . @@ -19,7 +22,7 @@ ENV VITE_DOCS_URL=$VITE_DOCS_URL RUN pnpm build -FROM nginx:1.29-alpine +FROM nginx:1.31-alpine COPY --from=build /app/dist /usr/share/nginx/html COPY docker/nginx.conf.template /app/nginx.conf.template