Fix Docker build: move onlyBuiltDependencies to pnpm-workspace.yaml, pin pnpm@10
Build and Push Docker Image / build (push) Successful in 1m8s

pnpm 10 no longer reads the "pnpm" field in package.json and treats
ignored build scripts as a hard error (ERR_PNPM_IGNORED_BUILDS), which
broke `pnpm install --frozen-lockfile` in the Docker build.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Jason Stedwell
2026-06-30 09:15:41 -05:00
parent 04f7417aa5
commit 97a7a1b4c3
3 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -6,7 +6,7 @@ FROM node:22-alpine AS client-builder
WORKDIR /build WORKDIR /build
# Install pnpm # Install pnpm
RUN corepack enable && corepack prepare pnpm@latest --activate RUN corepack enable && corepack prepare pnpm@10 --activate
# Copy workspace manifests first for better layer caching # Copy workspace manifests first for better layer caching
COPY pnpm-workspace.yaml package.json pnpm-lock.yaml* ./ COPY pnpm-workspace.yaml package.json pnpm-lock.yaml* ./
@@ -29,7 +29,7 @@ FROM node:22-alpine AS server-builder
WORKDIR /build WORKDIR /build
RUN corepack enable && corepack prepare pnpm@latest --activate RUN corepack enable && corepack prepare pnpm@10 --activate
COPY pnpm-workspace.yaml package.json pnpm-lock.yaml* ./ COPY pnpm-workspace.yaml package.json pnpm-lock.yaml* ./
COPY apps/server/package.json ./apps/server/ COPY apps/server/package.json ./apps/server/
@@ -51,7 +51,7 @@ FROM node:22-alpine AS runtime
# Install tini for proper PID 1 signal handling # Install tini for proper PID 1 signal handling
RUN apk add --no-cache tini su-exec RUN apk add --no-cache tini su-exec
RUN corepack enable && corepack prepare pnpm@latest --activate RUN corepack enable && corepack prepare pnpm@10 --activate
WORKDIR /app WORKDIR /app
-3
View File
@@ -9,8 +9,5 @@
}, },
"devDependencies": { "devDependencies": {
"concurrently": "^8.2.2" "concurrently": "^8.2.2"
},
"pnpm": {
"onlyBuiltDependencies": ["esbuild"]
} }
} }
+3
View File
@@ -1,2 +1,5 @@
packages: packages:
- 'apps/*' - 'apps/*'
onlyBuiltDependencies:
- esbuild