Skip to content

fix(docker): use Node 22.14 + corepack via packageManager field - #2

Merged
aloks98 merged 2 commits into
masterfrom
fix/dockerfile-corepack
May 10, 2026
Merged

fix(docker): use Node 22.14 + corepack via packageManager field#2
aloks98 merged 2 commits into
masterfrom
fix/dockerfile-corepack

Conversation

@aloks98

@aloks98 aloks98 commented May 10, 2026

Copy link
Copy Markdown
Owner

Summary

The v0.3.0 release pipeline failed at the Docker frontend build stage with:

```
Internal Error: Cannot find matching keyid: ...
at verifySignature (corepack.cjs:21535:47)
```

Reproduced locally — `node:22.12.0-slim` ships corepack 0.30 with an old signing-key set that doesn't recognize current pnpm signatures, so `corepack prepare pnpm@latest --activate` exits 1.

What changed

  • `Dockerfile`: bump base image `node:22.12.0-slim` → `node:22.14.0-slim` (corepack 0.31+ has the current key set).
  • `Dockerfile`: drop `corepack prepare pnpm@latest --activate`. The subsequent `pnpm install` triggers corepack to read `packageManager` from `package.json` (`pnpm@9.15.1` + integrity hash) — same pnpm as local dev, no floating tag, no future key drift.

Test plan

  • Reproduce failure: `docker run --rm node:22.12.0-slim sh -c 'corepack enable && corepack prepare pnpm@latest --activate'` → reproduces the keyid error
  • Verify fix: `docker run --rm -v $PWD/web:/app/web -w /app/web node:22.14.0-slim sh -c 'corepack enable && pnpm install --frozen-lockfile'` → succeeds, uses pnpm 9.15.1
  • After merge, cut v0.3.1 to publish `ghcr.io/aloks98/wolnut:v0.3.1` and update `:latest`. The v0.3.0 GitHub release already has the bare-metal binaries attached; only the Docker image is missing.

🤖 Generated with Claude Code

aloks98 and others added 2 commits May 11, 2026 00:14
The v0.3.0 release pipeline failed at `corepack prepare pnpm@latest --activate`
inside the Docker frontend build stage with:

  Internal Error: Cannot find matching keyid: ...
    at verifySignature (corepack.cjs:21535:47)

Reproduced locally with `docker run --rm node:22.12.0-slim sh -c
'corepack enable && corepack prepare pnpm@latest --activate'`. Node 22.12.0
ships corepack 0.30, whose baked-in key set predates the keys used to sign
current pnpm releases — `pnpm@latest` resolves to a pnpm version that
corepack 0.30 refuses to install.

Two fixes:

1. Bump to node:22.14.0-slim (corepack 0.31+ has the current key set).
2. Drop `corepack prepare pnpm@latest`. `pnpm install` triggers corepack to
   read the `packageManager` field from package.json (pnpm@9.15.1 + integrity
   hash) and download exactly that version — same pnpm as local dev, no
   floating tag, no future signature-key drift.

Verified locally: `docker run … node:22.14.0-slim sh -c 'corepack enable &&
pnpm install --frozen-lockfile'` now succeeds and uses pnpm 9.15.1 from the
lockfile.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Picks up active LTS instead of maintenance LTS:

- node:24-slim ships corepack 0.34 (current key set, no signature bug)
- Node 24 is the active LTS line until Oct 2026; 22 is in maintenance
- Stays off Node 25+ which unbundled corepack — keeping the clean
  `corepack enable` install path

Verified end-to-end: `docker run --rm -v \$PWD/web:/app/web -w /app/web
node:24-slim sh -c 'corepack enable && pnpm install --frozen-lockfile &&
pnpm build'` builds the static SPA cleanly with pnpm 9.15.1 from the
packageManager field.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@aloks98
aloks98 merged commit 48da66d into master May 10, 2026
2 checks passed
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