Skip to content

fix(issuer): disable corepack and use node directly in runtime stage#15

Merged
oyyblin merged 1 commit into
mainfrom
fix/issuer-dockerfile-nonroot
Mar 10, 2026
Merged

fix(issuer): disable corepack and use node directly in runtime stage#15
oyyblin merged 1 commit into
mainfrom
fix/issuer-dockerfile-nonroot

Conversation

@oyyblin
Copy link
Copy Markdown
Contributor

@oyyblin oyyblin commented Mar 10, 2026

Summary

  • Disable corepack in the runtime Docker stage
  • Use node dist/common/server.cjs directly instead of pnpm start

Why

Corepack tries to write to /.cache/node/corepack/ at startup. This fails when running with readOnlyRootFilesystem: true or as a non-root user in Kubernetes (runAsUser: 65532).

Since pnpm start just runs node dist/common/server.cjs, we can call node directly and avoid the corepack dependency at runtime entirely.

Test

Built and tested locally:

docker build -f apps/issuer/Dockerfile --target issuer -t issuer:test .
docker run --rm --user 65532:65532 --read-only --tmpfs /tmp issuer:test

Starts without permission errors (crashes on missing env vars as expected).

Corepack tries to write to /.cache at startup, which fails when
running as non-root or with readOnlyRootFilesystem in Kubernetes.

Disable corepack in runtime stage and call node directly instead of
pnpm start (which is just node dist/common/server.cjs).
@oyyblin oyyblin requested a review from Stumble March 10, 2026 18:22
@oyyblin oyyblin merged commit ae64be8 into main Mar 10, 2026
1 check passed
@oyyblin oyyblin deleted the fix/issuer-dockerfile-nonroot branch March 10, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants