fix(docker): copy patches/ into deps stage so pnpm install succeeds (#2118)#2132
fix(docker): copy patches/ into deps stage so pnpm install succeeds (#2118)#2132swissky wants to merge 1 commit into
Conversation
…mdash-cms#2118) pnpm-workspace.yaml declares patchedDependencies pointing at patches/@sigstore__core@4.0.1.patch, which pnpm reads during `pnpm install --frozen-lockfile`. The deps stage never copied the patches/ directory, so the Docker build failed with ENOENT on the patch file. Copy it alongside the lockfile/workspace manifests before install.
|
There was a problem hiding this comment.
This is the right fix for the right problem. pnpm install --frozen-lockfile fails in the Docker deps stage because pnpm-workspace.yaml declares a patchedDependencies entry that points at patches/@sigstore__core@4.0.1.patch, but the patches/ directory was never copied into the stage. Adding COPY patches/ patches/ before the install step is the minimal, idiomatic fix.
I checked the full Dockerfile, the diff, pnpm-workspace.yaml, the .dockerignore, and the patch file itself:
patches/@sigstore__core@4.0.1.patchexists and matches the path inpatchedDependencies..dockerignoredoes not excludepatches/(or any.patchfiles), so the patch makes it into the Docker build context.- The new
COPYis placed beforeRUN pnpm install --frozen-lockfile, sopnpmcan find the patch during install. - The only Dockerfile in the repo is
/repo/Dockerfile, so there are no sibling images that need the same fix. - This is a Dockerfile-only change with no published-package impact, so omitting a changeset is correct per
AGENTS.md.
No blocking or suggestion-level issues found. LGTM.
@emdash-cms/admin
@emdash-cms/auth
@emdash-cms/auth-atproto
@emdash-cms/blocks
@emdash-cms/cloudflare
@emdash-cms/contentful-to-portable-text
emdash
create-emdash
@emdash-cms/gutenberg-to-portable-text
@emdash-cms/plugin-cli
@emdash-cms/plugin-types
@emdash-cms/registry-client
@emdash-cms/registry-lexicons
@emdash-cms/registry-verification
@emdash-cms/sandbox-workerd
@emdash-cms/x402
@emdash-cms/plugin-ai-moderation
@emdash-cms/plugin-atproto
@emdash-cms/plugin-audit-log
@emdash-cms/plugin-color
@emdash-cms/plugin-embeds
@emdash-cms/plugin-field-kit
@emdash-cms/plugin-forms
@emdash-cms/plugin-webhook-notifier
commit: |
|
I tried to fix that issue, too. Did the same fix you did in this PR. But after fixing this issue, - it still fails with other issues. Tried with this PR: Eventually I found that their docs have totally different Dockerfile than their Github repo: I tried it too, but it doesn't work. God bless you if you can figure out the solution. |
What does this PR do?
docker compose upfailed at thedepsstage with:pnpm-workspace.yamldeclarespatchedDependenciespointing atpatches/@sigstore__core@4.0.1.patch, which pnpm reads duringpnpm install --frozen-lockfile. Thedepsstage copied the lockfile and workspace manifests but never thepatches/directory, so the install couldn't find the patch file.This PR copies
patches/into thedepsstage (beforepnpm install), alongside the other install inputs.Closes #2118
Type of change
Checklist
pnpm typecheckpassespnpm lintpassespnpm testpasses (or targeted tests for my change)pnpm formathas been runmessages.pochanges except in translation PRs — a workflow extracts catalogs on merge tomain.AI-generated code disclosure
Screenshots / test output
No behavior change to a published package (Dockerfile only), so no changeset. I could not run
docker composelocally (Docker Desktop isn't installed on this machine), but the fix is verified statically: the patch file exists atpatches/@sigstore__core@4.0.1.patch, is not excluded by.dockerignore, and the newCOPY patches/ patches/lands in thedepsstage beforeRUN pnpm install --frozen-lockfile.