Skip to content

fix(docker): install pnpm without Corepack, which Node 26 dropped - #175

Merged
kodiakhq[bot] merged 1 commit into
mainfrom
fix/docker-corepack
Nov 17, 2026
Merged

kodiakhq[bot] merged 1 commit into
mainfrom
fix/docker-corepack

Conversation

@RedStar071

Copy link
Copy Markdown
Member

🔗 Linked issue

No issue. Found while turning on the guild API for wolfstar-project/wolfstar.rocks#414.

🧭 Context

Every Continuous Delivery run has failed since the move to Node 26 (#135). The image build stops at RUN corepack enable with exit 127, because Node 25 and later no longer ship Corepack. No image has been published since 16 November, so production still runs a Staryl without the guild API (#173) and without the OAuth callback fix (#174).

📚 Description

pnpm now comes from its official image instead of Corepack:

COPY --from=ghcr.io/pnpm/pnpm:12.20.0-alpine /opt/pnpm /opt/pnpm
ENV PATH="/opt/pnpm:$PATH"
  • It is a standalone binary for Alpine, published for amd64 and arm64, pinned to the packageManager version.
  • Nothing is installed with npm, and nothing is downloaded when the container starts.
  • The binary needs the dist/ folder next to it, so the whole /opt/pnpm folder is copied, not /bin/pnpm alone.

Three fixes were built locally from scratch:

Variant Image pnpm
npm install --global [email protected] && corepack enable (as the WolfStar bot does) 2.18 GB 12.21.0 outside the app folder, not the pinned version
npm install --global [email protected] 2.02 GB 12.20.0
Official pnpm image (this PR) 1.94 GB 12.20.0

The image tag and packageManager must move together. Renovate may bump them in separate pull requests.

🤖 AI disclosure: Wolfstar Agent Kit modified this description. AI open source policy.

Since the move to Node 26 every image build fails at 'corepack enable'
with exit 127: Node 25 and later no longer ship Corepack. No image was
published after 16 November, so production still runs a Staryl without
the guild API and the OAuth callback fix.

pnpm now comes from its official image, a standalone binary pinned to the
packageManager version.
@coldtea-pr-lens

Copy link
Copy Markdown

Note

Only configuration files changed, so PR Lens left this pull request undrawn. Comment @pr-lens draw to draw it

github.comment.notice: false in .github/pr-lens.yml turns this note off

@RedStar071

Copy link
Copy Markdown
Member Author

🤖 Agent comment (Claude, via Wolfstar Agent Kit). CI does not build the image on a pull request, so this was checked by hand.

  • Built --target runner from scratch with Docker 29.3 on linux/amd64: success. The old Dockerfile fails at corepack enable with exit 127, as in the Continuous Delivery runs.
  • In the built image, pnpm --version answers 12.20.0.
  • The container started against a throwaway Postgres. prisma db push ran from node_modules/.bin. GET / answered {"data":"Hello world"}, /guilds/:guild/notifications answered 401 without the secret and 200 on PATCH with it, and /social/tiktok/callback answered 400 with a fake state.
  • Not checked: the arm64 build. The pnpm image publishes arm64, and Continuous Delivery builds it after the merge.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes: the single Dockerfile change in this PR.

  • pnpm install replaced: RUN corepack enable (fails with exit 127 on node:26-alpine) becomes COPY --from=ghcr.io/pnpm/pnpm:12.20.0-alpine /opt/pnpm /opt/pnpm plus ENV PATH="/opt/pnpm:$PATH".

The approach matches pnpm's own Docker guide: Alpine variant for an Alpine Node base, whole /opt/pnpm directory copied, amd64 and arm64 published. The tag 12.20.0 matches packageManager in package.json, and PNPM_HOME, the store cache mounts and the runner stage are untouched. Putting /opt/pnpm on PATH rather than symlinking into /usr/local/bin (as the guide does) is equivalent here. The tag and packageManager can drift when Renovate bumps them separately, but the PR description and the Dockerfile comment already call that out.

Pullfrog  | View workflow run | Using claude-sonnet-5-5 | 𝕏

@kodiakhq
kodiakhq Bot merged commit b6880c8 into main Nov 17, 2026
10 checks passed
@kodiakhq
kodiakhq Bot deleted the fix/docker-corepack branch November 17, 2026 15:54
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.

1 participant