Repository navigation
build: install corepack in the docker build stage - #3616
Merged
Merged
Conversation
The node:26 images no longer bundle Yarn and Node 25+ no longer ships Corepack, so `yarn install` failed with exit code 127 in the devstaging build after the Node 26 upgrade (#3588). CI was unaffected because GitHub runners have Yarn installed globally. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The Dockerfile reads the corepack version from devDependencies instead of hardcoding it, so the existing npm Dependabot ecosystem keeps it current. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Pooya Raki (PooyaRaki)
marked this pull request as ready for review
October 15, 2026 16:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Docker image build has been failing on
mainsince the Node 26 upgrade (#3588):RUN yarn installexits with/bin/sh: yarn: not found(exit code 127) — failed run. The officialnodeimages stopped bundling Yarn v1 from Node 26 (nodejs/docker-node#2474), and Node itself stopped shipping Corepack from v25, so the build stage has no way to start Yarn. CI didn't catch it because the GitHub runners have Yarn installed globally; only the Docker build runs inside the bare image.This installs Corepack in the build stage and enables it. Corepack resolves
[email protected]frompackageManager, which then defers to the vendored release viayarnPath. The Corepack version is pinned as a devDependency (0.36.0, past the 7-daynpmMinimalAgeGate) and the Dockerfile reads it frompackage.json, so the existing npm Dependabot ecosystem bumps it — Dependabot's docker ecosystem only updatesFROMtags, not version values inARG/ENV. The production stage runsnodedirectly and is unchanged.Changes
Dockerfile: after copyingpackage.json,npm install --global corepack@<devDependencies.corepack> && corepack enablein thebasestage, before anyyarncall.package.json/yarn.lock: add[email protected]todevDependencies.🤖 Generated with Claude Code