Skip to content

Fix image build: install corepack, streamline Dockerfile - #17

Merged
robertying merged 1 commit into
mainfrom
claude/github-action-failures-pobpn9
Nov 2, 2026
Merged

robertying merged 1 commit into
mainfrom
claude/github-action-failures-pobpn9

Conversation

@robertying

Copy link
Copy Markdown
Owner

Problem

"Build and push the image" fails on main (run 41401690942) at corepack enable && corepack install with exit code 127 (command not found).

node:lts-alpine is 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

  • Install corepack explicitly in a shared tooling stage (npm install -g corepack && corepack enable). deps and builder build on it; runner stays on plain base.
  • builder now builds FROM deps, so it reuses node_modules and the pnpm download. Previously corepack install ran after COPY . . and re-downloaded pnpm on every source change.
  • Merge corepack install && pnpm install and addgroup && adduser into single RUNs.
  • Use ENV KEY=value (the legacy ENV KEY value form triggers buildx warnings).
  • Add a .dockerignore (.git, .github, node_modules, .next, Dockerfile, .dockerignore).

The floating lts-alpine tag 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

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
@robertying
robertying merged commit 6b397a6 into main Nov 2, 2026
2 checks passed
@robertying
robertying deleted the claude/github-action-failures-pobpn9 branch November 2, 2026 07:57
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