mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 09:01:03 -08:00
build(docker): move image to node 24 and install pnpm without corepack (#1265)
Supersedes #1250, whose 22 -> 26 bump failed the image build: `corepack enable` exits 127 because Node 25 unbundled Corepack. Both stages move to node:24-alpine, the current LTS line — Node 26 stays Current until October 2026, which is the wrong target for a self-hosted runtime image. pnpm is installed globally at the exact `packageManager` version, with the `+sha512...` suffix stripped, so the next base-image major is a one-line change instead of a broken build.
This commit is contained in:
1 parent
f193232dab
commit
23512411a0
2 files changed
+12
-4
No files matched your search
+8
-3
@@ -1,7 +1,7 @@
|
||||
# The Nx builds below emit platform-independent JS/static assets. During
|
||||
# multi-arch publish builds, keep that heavy build stage on the native builder
|
||||
# platform instead of running Node/Nx through QEMU for linux/arm64.
|
||||
FROM --platform=$BUILDPLATFORM node:22-alpine AS build
|
||||
FROM --platform=$BUILDPLATFORM node:24-alpine AS build
|
||||
|
||||
RUN apk add --no-cache python3 make g++ git
|
||||
|
||||
@@ -11,7 +11,12 @@ COPY .npmrc ./
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
COPY patches ./patches
|
||||
|
||||
RUN corepack enable && pnpm install --frozen-lockfile --ignore-scripts
|
||||
# Node 25 unbundled Corepack, so `corepack enable` cannot be the way pnpm gets
|
||||
# installed here — it would break on the next base-image major. Install the
|
||||
# exact pnpm from `packageManager` instead, which stays reproducible.
|
||||
RUN PNPM_VERSION="$(node -p 'require("./package.json").packageManager.split("@")[1].split("+")[0]')" \
|
||||
&& npm install --global "pnpm@${PNPM_VERSION}" \
|
||||
&& pnpm install --frozen-lockfile --ignore-scripts
|
||||
|
||||
COPY . .
|
||||
|
||||
@@ -23,7 +28,7 @@ RUN node tools/build/inject-build-commit.mjs
|
||||
RUN pnpm nx build web --configuration=pwa
|
||||
RUN pnpm nx build web-backend
|
||||
|
||||
FROM node:22-alpine
|
||||
FROM node:24-alpine
|
||||
|
||||
RUN apk add --no-cache gettext nginx
|
||||
|
||||
|
||||
Reference in new issue
Block a user