fix(docker): take the pnpm version from package.json
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:
1 file changed
+2
-1
+2
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user