Repository navigation
Fix image build: install corepack, streamline Dockerfile - #17
Merged
Merged
Conversation
node:lts-alpine now resolves to Node 26, which no longer bundles corepack, so `corepack enable` failed with exit code 127 and the image build broke. Install corepack in a shared tooling stage, build the builder stage on top of deps so it reuses node_modules and the pnpm download, merge related RUN steps, use the non-legacy ENV syntax, and add a .dockerignore. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A5JNTniyTh2Gg3XYPsZVxW
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.
Problem
"Build and push the image" fails on
main(run 41401690942) atcorepack enable && corepack installwith exit code 127 (command not found).node:lts-alpineis a floating tag. Node 26 became LTS on 2026-10-28, so it now resolves to Node 26, and Node 25+ no longer bundles corepack. The last green image build was on 10-27, before the switch.Changes
toolingstage (npm install -g corepack && corepack enable).depsandbuilderbuild on it;runnerstays on plainbase.buildernow buildsFROM deps, so it reusesnode_modulesand the pnpm download. Previouslycorepack installran afterCOPY . .and re-downloaded pnpm on every source change.corepack install && pnpm installandaddgroup && adduserinto singleRUNs.ENV KEY=value(the legacyENV KEY valueform triggers buildx warnings)..dockerignore(.git,.github,node_modules,.next,Dockerfile,.dockerignore).The floating
lts-alpinetag is kept on purpose.Testing
Not built locally (no Docker daemon in the authoring environment); the PR's CI image job is the first real build. The image is only pushed on
main, so verify the deploy after merge.Generated by Claude Code