Repository navigation
build(docker): take pnpm from its official image instead of Corepack - #406
Conversation
Node 25 and later no longer ship Corepack, so both images installed it from npm, then let it fetch pnpm. pnpm now comes from its official image: a standalone binary pinned to the packageManager version, with no npm install and nothing fetched when the node user runs pnpm start. Staryl needed the same change after its builds broke on Node 26.
|
Note The title starts with
|
|
🤖 Agent comment (Claude, via Wolfstar Agent Kit). Checked by hand, since CI does not run the image.
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — both Dockerfiles, one commit.
Dockerfileandprojects/bot/Dockerfile: the Corepack block (COREPACK_HOME,npm install --global corepack,corepack enable/install,chmod) is replaced byCOPY --from=ghcr.io/pnpm/pnpm:12.18.0-alpine /opt/pnpm /opt/pnpmandENV PATH="/opt/pnpm:$PATH".
The base is node:26-alpine, so the -alpine (musl) pnpm image is the right variant. The tag matches packageManager ([email protected]), so pnpm 12 has no reason to switch versions at start. The whole /opt/pnpm folder is copied, as the pnpm Docker docs advise. They symlink pnpm, pn, pnpx and pnx into /usr/local/bin. Putting /opt/pnpm on PATH reaches the same binary and works for the node user. The comment about keeping the tag and packageManager in step is a good guard against Renovate bumping them separately.
claude-sonnet-5-5 | 𝕏

🔗 Linked issue
No issue. The same change as wolfstar-project/staryl#175.
🧭 Context
Node 25 and later no longer ship Corepack. Both Dockerfiles install it from npm, then let it fetch the pnpm version of
packageManager. Staryl did not, and its image builds failed for a day after the move to Node 26. This takes pnpm out of that chain here too.📚 Description
In
Dockerfileandprojects/bot/Dockerfile, the Corepack block becomes:packageManager([email protected]).nodeuser runspnpm startwith nothing to download. That was the job ofCOREPACK_HOMEand itschmod, which go away.dist/folder next to it, so the whole/opt/pnpmfolder is copied.Built locally from the root
Dockerfile,--target runner:The image tag and
packageManagermust move together. Renovate may bump them in separate pull requests.

Confidence Score: 5/5
The PR appears safe to merge.Reviews (1) · Last reviewed commit: "build(docker): take pnpm from its offici..." · Reviewed by Greptile