fix: build Web image builder stage on native platform#334
Merged
Conversation
The v0.10.6 release CD run failed the Web image build: bun install under QEMU emulation for the linux/arm64 target corrupted extraction of the @biomejs/cli-linux-arm64 tarball (a devDependency never actually invoked by the build script). Since apps/web's build output is architecture-independent static assets, pin the builder stage to --platform=$BUILDPLATFORM so it always runs natively and skips QEMU entirely; only the final caddy runtime stage needs to be multi-arch. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Reviewed changes — pins the Web image builder stage to the native build platform so bun install runs without QEMU emulation on linux/arm64, avoiding a tarball-extraction failure with @biomejs/cli-linux-arm64.
- Pin builder to
--platform=$BUILDPLATFORMinapps/web/Dockerfile— the builder stage produces architecture-independent static assets (tsc -b && vite build), so cross-arch emulation provides no benefit and thebun installstep has been observed to corrupt native-binary tarballs under QEMU. Thecaddy:2-alpineruntime stage remains multi-arch, unchanged.
DeepSeek Pro (free via Pullfrog for OSS) (Kimi K2 not used — the program covers this model; add its provider key to run your pick) | 𝕏
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
bun install --frozen-lockfileerrored withFail extracting tarball for "@biomejs/cli-linux-arm64"while building thelinux/arm64target under QEMU emulation.apps/web's builder stage only produces architecture-independent static assets (tsc -b && vite build), and never runsbiome(it's an unused devDependency at build time), so there's no reason to emulate arm64 for that stage at all.--platform=$BUILDPLATFORMsobun install/bun run buildalways run natively on the runner's arch, sidestepping the QEMU-related tarball corruption. Only the finalcaddyruntime stage remains multi-arch (a plainCOPYof static files, so no emulation needed there either).Test plan
docker buildx build --platform linux/amd64 -f apps/web/Dockerfile apps/websucceeds locally with the fix.linux/amd64andlinux/arm64.🤖 Generated with Claude Code