Skip to content

fix(docker): copy patches/ into deps stage so pnpm install succeeds (#2118)#2132

Open
swissky wants to merge 1 commit into
emdash-cms:mainfrom
swissky:fix/docker-patches-2118
Open

fix(docker): copy patches/ into deps stage so pnpm install succeeds (#2118)#2132
swissky wants to merge 1 commit into
emdash-cms:mainfrom
swissky:fix/docker-patches-2118

Conversation

@swissky

@swissky swissky commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

docker compose up failed at the deps stage with:

pnpm: ENOENT: no such file or directory, open '/app/patches/@sigstore__core@4.0.1.patch'

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 copied the lockfile and workspace manifests but never the patches/ directory, so the install couldn't find the patch file.

This PR copies patches/ into the deps stage (before pnpm install), alongside the other install inputs.

Closes #2118

Type of change

  • Bug fix
  • Feature (requires maintainer-approved Discussion)
  • Refactor (no behavior change)
  • Translation
  • Documentation
  • Performance improvement
  • Tests
  • Chore (dependencies, CI, tooling)

Checklist

  • I have read CONTRIBUTING.md
  • pnpm typecheck passes
  • pnpm lint passes
  • pnpm test passes (or targeted tests for my change)
  • pnpm format has been run
  • I have added/updated tests for my changes (if applicable)
  • User-visible strings in the admin UI are wrapped for translation (if applicable). Do not include messages.po changes except in translation PRs — a workflow extracts catalogs on merge to main.
  • I have added a changeset (if this PR changes a published package)
  • New features link to an approved Discussion: https://github.com/emdash-cms/emdash/discussions/...

AI-generated code disclosure

  • This PR includes AI-generated code — model/tool: Cursor + Kimi K3

Screenshots / test output

No behavior change to a published package (Dockerfile only), so no changeset. I could not run docker compose locally (Docker Desktop isn't installed on this machine), but the fix is verified statically: the patch file exists at patches/@sigstore__core@4.0.1.patch, is not excluded by .dockerignore, and the new COPY patches/ patches/ lands in the deps stage before RUN pnpm install --frozen-lockfile.

…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.
@changeset-bot

changeset-bot Bot commented Jul 19, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e60480e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions Bot added review/needs-review No maintainer or bot review yet size/XS cla: signed labels Jul 19, 2026

@emdashbot emdashbot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.patch exists and matches the path in patchedDependencies.
  • .dockerignore does not exclude patches/ (or any .patch files), so the patch makes it into the Docker build context.
  • The new COPY is placed before RUN pnpm install --frozen-lockfile, so pnpm can 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.

@pkg-pr-new

pkg-pr-new Bot commented Jul 19, 2026

Copy link
Copy Markdown

Open in StackBlitz

@emdash-cms/admin

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/admin@2132

@emdash-cms/auth

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/auth@2132

@emdash-cms/auth-atproto

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/auth-atproto@2132

@emdash-cms/blocks

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/blocks@2132

@emdash-cms/cloudflare

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/cloudflare@2132

@emdash-cms/contentful-to-portable-text

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/contentful-to-portable-text@2132

emdash

npm i https://pkg.pr.new/emdash-cms/emdash@2132

create-emdash

npm i https://pkg.pr.new/emdash-cms/emdash/create-emdash@2132

@emdash-cms/gutenberg-to-portable-text

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/gutenberg-to-portable-text@2132

@emdash-cms/plugin-cli

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-cli@2132

@emdash-cms/plugin-types

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-types@2132

@emdash-cms/registry-client

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/registry-client@2132

@emdash-cms/registry-lexicons

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/registry-lexicons@2132

@emdash-cms/registry-verification

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/registry-verification@2132

@emdash-cms/sandbox-workerd

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/sandbox-workerd@2132

@emdash-cms/x402

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/x402@2132

@emdash-cms/plugin-ai-moderation

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-ai-moderation@2132

@emdash-cms/plugin-atproto

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-atproto@2132

@emdash-cms/plugin-audit-log

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-audit-log@2132

@emdash-cms/plugin-color

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-color@2132

@emdash-cms/plugin-embeds

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-embeds@2132

@emdash-cms/plugin-field-kit

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-field-kit@2132

@emdash-cms/plugin-forms

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-forms@2132

@emdash-cms/plugin-webhook-notifier

npm i https://pkg.pr.new/emdash-cms/emdash/@emdash-cms/plugin-webhook-notifier@2132

commit: e60480e

@github-actions github-actions Bot added review/approved Approved; no new commits since and removed review/needs-review No maintainer or bot review yet labels Jul 19, 2026
@SlavikCA

Copy link
Copy Markdown
Contributor

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:
https://github.com/emdash-cms/emdash/pull/2119/changes

Eventually I found that their docs have totally different Dockerfile than their Github repo:
https://docs.emdashcms.com/deployment/nodejs/#docker

I tried it too, but it doesn't work.

God bless you if you can figure out the solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: signed review/approved Approved; no new commits since size/XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docker compose deploy fails

2 participants