Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

fix(docker): derive web pnpm version from packageManager (#4815)

ZeroIce94778449ebe1
diff --git a/Dockerfile.web b/Dockerfile.web
index 82b41a8183..f8c3d7fc58 100644
--- a/Dockerfile.web
+++ b/Dockerfile.web
@@ -1,8 +1,6 @@
# --- Dependencies ---
FROM node:22-alpine AS deps
-RUN corepack enable && corepack prepare [email protected] --activate
-
WORKDIR /app
# Copy workspace config and all package.json files for dependency resolution
@@ -16,15 +14,23 @@ COPY packages/views/package.json packages/views/
COPY packages/tsconfig/package.json packages/tsconfig/
COPY packages/eslint-config/package.json packages/eslint-config/
+RUN corepack enable && \
+ PNPM_VERSION="$(node -p 'require("./package.json").packageManager')" && \
+ corepack prepare "$PNPM_VERSION" --activate
RUN pnpm install --frozen-lockfile
# --- Build ---
FROM node:22-alpine AS builder
-RUN corepack enable && corepack prepare [email protected] --activate
-
WORKDIR /app
+# Activate the same pnpm version declared by the repository before the
+# offline frozen install validates package-manager metadata in pnpm-lock.yaml.
+COPY package.json ./
+RUN corepack enable && \
+ PNPM_VERSION="$(node -p 'require("./package.json").packageManager')" && \
+ corepack prepare "$PNPM_VERSION" --activate
+
# Copy installed dependencies (preserves pnpm symlink structure)
COPY --from=deps /app ./