fix(docker): take the pnpm version from package.json
CI / Code Health (pull_request) Successful in 8s
CI / Lint & Build (pull_request) Successful in 32s

The Dockerfile pinned pnpm@11.2.2 while package.json declares
packageManager pnpm@12.17.0. Renovate only updates the npm manager's
packageManager field and the lockfile, so the RUN line drifted a major
behind and no longer described the build.

pnpm 10+ already reads packageManager and downloads that version at
runtime, so the pin was also dead weight: the deploy log shows
"npm install -g pnpm@11.2.2" followed by "Done in 16.8s using pnpm
v12.16.1".

Read the version from package.json instead, so the one field Renovate
maintains is the only source of truth.
This commit is contained in:
fristy committed 2026-11-06 13:20:02 +03:00
1 parent 28a0c9b78c
commit 9af3043972
1 file changed
+2 -1
+2 -1
View File
@@ -1,8 +1,9 @@
FROM node:lts-alpine AS builder
RUN npm install -g pnpm@11.2.2
ENV CI=true
WORKDIR /app
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
# The version comes from packageManager in package.json, which Renovate keeps current.
RUN npm install -g pnpm@$(node -p "require('./package.json').packageManager.split('@').pop()")
RUN pnpm install --frozen-lockfile
COPY . .
RUN pnpm build