Skip to content

fix: build Web image builder stage on native platform#334

Merged
pikann merged 1 commit into
masterfrom
fix/web-image-arm64-qemu-bun-install
Jul 26, 2026
Merged

fix: build Web image builder stage on native platform#334
pikann merged 1 commit into
masterfrom
fix/web-image-arm64-qemu-bun-install

Conversation

@pikann

@pikann pikann commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • The v0.10.6 CD run's Web image build failed: bun install --frozen-lockfile errored with Fail extracting tarball for "@biomejs/cli-linux-arm64" while building the linux/arm64 target under QEMU emulation.
  • apps/web's builder stage only produces architecture-independent static assets (tsc -b && vite build), and never runs biome (it's an unused devDependency at build time), so there's no reason to emulate arm64 for that stage at all.
  • Pin the builder stage to --platform=$BUILDPLATFORM so bun install/bun run build always run natively on the runner's arch, sidestepping the QEMU-related tarball corruption. Only the final caddy runtime stage remains multi-arch (a plain COPY of static files, so no emulation needed there either).

Test plan

  • docker buildx build --platform linux/amd64 -f apps/web/Dockerfile apps/web succeeds locally with the fix.
  • Next release's CD run builds & pushes the Web image successfully for both linux/amd64 and linux/arm64.

🤖 Generated with Claude Code

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>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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=$BUILDPLATFORM in apps/web/Dockerfile — the builder stage produces architecture-independent static assets (tsc -b && vite build), so cross-arch emulation provides no benefit and the bun install step has been observed to corrupt native-binary tarballs under QEMU. The caddy:2-alpine runtime stage remains multi-arch, unchanged.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) (Kimi K2 not used — the program covers this model; add its provider key to run your pick) | 𝕏

@pikann
pikann merged commit bb9ceac into master Jul 26, 2026
1 check passed
@pikann
pikann deleted the fix/web-image-arm64-qemu-bun-install branch July 26, 2026 05:59
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