Skip to content

fix: improve build reliability with fallback apt mirrors - #18155

Merged
bpmct merged 2 commits into
mainfrom
fix-bun-installation
Jun 2, 2025
Merged

bpmct merged 2 commits into
mainfrom
fix-bun-installation

Conversation

@bpmct

@bpmct bpmct commented Jun 1, 2025 •

Copy link
Copy Markdown
Member

Summary

  • Fixes image build failure by adding fallback to kernel.org mirrors when Ubuntu/Debian repositories fail
  • Ensures unzip is available during Bun installation process
  • Improves apt repository configuration to prevent 403 errors in CI

Root Cause

The build was failing for two reasons:

  1. Network issues with Ubuntu/Debian package repositories returning 403 Forbidden errors
  2. Unzip package not being reliably available in the image layer where Bun installation happens

Fix

  • Added fallback mirrors for apt repositories using kernel.org mirrors
  • Explicitly installed unzip before using it in the Bun installation
  • Added proper cleanup after package installations to keep image size down

Test plan

  • The CI workflow that was previously failing should now succeed
  • Build the dogfood image locally with cd dogfood/coder && docker build -t codercom/oss-dogfood:test .
  • Verify Bun is correctly installed and can be used

Fixes build failure from PR #18154 (original PR that added Bun)

🤖 Generated with Claude Code

This fix explicitly installs unzip in the same command chain where it's used for
the Bun installation process. Even though unzip is installed earlier in the
Dockerfile, this ensures it's available at the exact point it's needed,
avoiding potential issues in CI build environments like Depot.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Adds fallback to kernel.org mirrors when Ubuntu/Debian repositories fail
- Ensures unzip is available for Bun installation process
- Improves apt repository configuration to prevent 403 errors

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@bpmct bpmct changed the title fix: ensure unzip is available for Bun installation fix: improve build reliability with fallback apt mirrors Jun 1, 2025
@bpmct
bpmct marked this pull request as ready for review June 1, 2025 23:36
@bpmct
bpmct merged commit 1e407fb into main Jun 2, 2025
@bpmct
bpmct deleted the fix-bun-installation branch June 2, 2025 00:01
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants