Skip to content

fix: make multi-architecture builds reliable - #6

Merged
jwcesign merged 1 commit into
mainfrom
codex/fix-docker-build-reliability
Jul 29, 2026
Merged

fix: make multi-architecture builds reliable#6
jwcesign merged 1 commit into
mainfrom
codex/fix-docker-build-reliability

Conversation

@jwcesign

Copy link
Copy Markdown
Owner

Why

Multi-platform builds downloaded dependencies separately for each architecture through a flaky proxy. A truncated wheel download caused pip install to fail immediately, and source changes invalidated the dependency layer because application files were copied first. The image also upgraded pip to an unpinned latest version on every build.

Proposed Changes

  • Copy and install requirements.txt before application source so dependency layers remain reusable.
  • Add a persistent BuildKit pip cache and bounded retries for interrupted package downloads.
  • Remove the mutable, unnecessary pip self-upgrade.
  • Add a minimal .dockerignore so only runtime source enters the build context.

Validation

  • Fresh linux/amd64,linux/arm64 Buildx build passed with multiarch-proxy.
  • Repeated dual-architecture build completed entirely from cache in 7.6 seconds.
  • python -m unittest discover -s tests (6 tests)
  • Pylint 10.00/10
  • git diff --check

Release Note

NONE

Signed-off-by: jwcesign <jiangwei@cloudpilot.ai>
@gitautomator

gitautomator Bot commented Jul 29, 2026

Copy link
Copy Markdown

Thanks to your contribution, the maintainers will review it as soon as they can!

@jwcesign
jwcesign merged commit b7e16c3 into main Jul 29, 2026
2 of 3 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