build: Fix Docker build chain after DHI base drift and the pnpm 11 upgrade - #36984
Merged
Conversation
DHI dropped busybox 1.38.0_git20260724-r5 from their Alpine 3.24 apk repo (their current builds are the 1.37.0_git2026xxxx line). Their busybox package provides only cmd:busybox, so `apk add busybox-binsh` supplies the /bin/sh that ca-certificates, libheif and openssh-server depend on — and it pins busybox's exact version. With the installed busybox absent from the repo, that dependency became unsatisfiable and the base image build stopped resolving packages. The 24.18.1 and 26.5.1 Alpine 3.24 dev tags are no longer published by DHI; 24.19.0 and 26.7.0 are the current builds and ship a busybox that matches the repo. Refresh the 22.23.2 digest for the same reason. Verified by building the base image for linux/amd64 and linux/arm64 against all three refs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
PR review overviewBased on ownership of the 4 changed files in this PR:
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
No issues found across 2 files
Architecture diagram
sequenceDiagram
participant CI as GHA Workflow (.github/workflows)
participant Bld as Docker Build Engine
participant Reg as DHI Registry (dhi.io)
participant APK as Alpine APK Repository
Note over CI,APK: Base Image Construction & Dependency Resolution
CI->>Bld: NEW: Trigger build with updated Node refs (24.19.0 / 26.7.0)
Bld->>Reg: CHANGED: Pull base image using updated digest/tag
Reg-->>Bld: Base Image Layers (with current busybox binaries)
Bld->>Bld: Execute Dockerfile instructions (FROM ${DHI_REF})
Bld->>APK: RUN apk add busybox-binsh (and other deps)
alt Dependency Mismatch (Previous state)
APK-->>Bld: 404/Error: busybox version pin not found in repo
Bld-->>CI: Build Failure
else Dependency Satisfied (Current state)
Note right of APK: APK repo contains busybox version matching base image
APK-->>Bld: Return compatible busybox-binsh package
Bld->>Bld: Complete n8n-base image assembly
Bld-->>CI: Build Success
end
Note over Bld: Verify against linux/amd64 and linux/arm64
pnpm 11 verifies dependencies before running a script and reinstalls when the tree looks stale. In the Docker chain that fires on `pnpm build:docker:smoke`, which runs right after `build-n8n.mjs` has trimmed the frontend manifests and deployed with `--prod`: the reinstall either fails the frozen-lockfile check against the trimmed manifests, or succeeds as a production install and prunes the devDependencies the smoke script imports (zx). Opt out of the pre-run verification, and restore the trimmed manifests in CI too rather than leaving the working tree mutated. Backups move to a temp dir outside the workspace, since sibling `.bak` files get packed into the deployment and would ship inside the image. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CharlieKolb
approved these changes
Aug 25, 2026
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 nightly
Docker Build Smoke Testhas been red since 2026-08-20. Two unrelated causes, the first masking the second.1. The base image build could not resolve
busybox-binsh. DHI droppedbusybox 1.38.0_git20260724-r5from their Alpine 3.24 apk repo and delisted the24.18.1/26.5.1dev tags. Theirbusyboxpackage provides onlycmd:busybox, sobusybox-binshis what supplies the/bin/shthatca-certificates,libheifandopenssh-serverhard-depend on — and it pinsbusybox=<exact version>, which is checksum-pinned in/etc/apk/worldand no longer exists in any configured repo:Bumped to DHI's current Alpine 3.24 builds (24.19.0, 26.7.0) with a 22.23.2 digest refresh.
/bin/shstays busybox ash; no image content change beyond the Node patch versions.Rejected alternatives, each tested against a local reproduction: dropping the
busybox-binshline (apk re-adds it implicitly for the/bin/shdep),dash-binsh/yash-binsh(both declareD:busybox, so the solver still moves busybox), and unpinning world (apk refuses to downgrade).2. pnpm 11 pruned the devDependencies the smoke script needs. pnpm 11 verifies dependencies before running a script and reinstalls when the tree looks stale. That fires on
pnpm build:docker:smoke, which runs right afterbuild-n8n.mjshas trimmed the frontend manifests and deployed with--prod: the reinstall either fails the frozen-lockfile check against the trimmed manifests, or succeeds as a production install and pruneszx, which the smoke script imports. Introduced by #36424, which does not touchdocker/images/**and so never ran this workflow..bakfiles get packed intocompiled/and would ship inside the image.How to test
Docker Build Smoke Testpasses on this PR — the first green run of the full chain since 2026-08-20.Base image, against all three refs on both architectures:
The pnpm behaviour, emulating the CI sequence:
Before:
ERR_PNPM_OUTDATED_LOCKFILE, or the script starts and dies on a missingzx. After: it runs with dev dependencies intact.Notes
The published
n8nio/base:26.5.1digest thatdocker/images/n8n/Dockerfilepins is untouched, so the n8n image build is unaffected. A follow-up moves it ontobase:26.7.0once this merge publishes it.The DHI change is a re-pin, not a structural fix — it recurs on the next DHI busybox roll, until digest bumps are automated (DEVP-266).
Publishing was checked separately and is unaffected:
release-publish.ymlruns nopnpm runstep after its trim, nestedprepackscripts do not trip the verification, and packed manifests carry no unresolvedcatalog:/workspace:specifiers.Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/DEVP-869