fix(docker): include pnpm-workspace and npmrc in builder context
CI / check (push) Successful in 1m12s
CI / deploy (push) Successful in 1m26s

The committed lockfile records overrides from pnpm-workspace.yaml. With the
narrower manifest COPY, pnpm install --frozen-lockfile ran without the
workspace file and failed with ERR_PNPM_LOCKFILE_CONFIG_MISMATCH in CI.
Copy package.json, pnpm-lock, pnpm-workspace and .npmrc together so the
override config present in the lockfile is also supplied at install time.
This commit is contained in:
openhands committed 2026-09-07 11:33:04 +02:00
1 parent bef1775dea
commit 3e0ba73d1c
2 files changed
+5 -2

No files matched your search

+4 -1
View File
@@ -9,7 +9,10 @@ ENV NEXT_TELEMETRY_DISABLED=1
# install only needs to exist as a bootstrap and follows the active major.
RUN apk add --no-cache git \
&& npm install -g pnpm@latest
COPY package.json pnpm-lock.yaml* ./
# pnpm-workspace.yaml + .npmrc must be present too: the lockfile records the
# overrides from pnpm-workspace.yaml, and --frozen-lockfile rejects a build
# where the workspace config is absent (ERR_PNPM_LOCKFILE_CONFIG_MISMATCH).
COPY package.json pnpm-lock.yaml* pnpm-workspace.yaml* .npmrc* ./
# pnpm fetch: download all deps into $PNPM_STORE first, so only the lockfile
# change (not source changes) invalidates the network-heavy download layer.
RUN pnpm fetch --ignore-scripts