Decouple multi-platform builds from default docker-compose config#93
Merged
Conversation
Removes linux/amd64+arm64 platform list from docker-compose.yml so `docker compose build` targets the host arch only — no QEMU overhead for x86 dev machines. Adds docker-compose.multiplatform.yml override and `make build-multiplatform` target for explicit cross-arch builds when pushing to a registry. https://claude.ai/code/session_011q11kw1s43qRJM8DYZjyHx
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
Refactors Docker build configuration to separate multi-platform (amd64 + arm64) builds from the default single-architecture workflow. This allows developers to build for their host architecture by default while providing an opt-in path for registry pushes that serve both x86 and Raspberry Pi deployments.
Changes
New file:
docker-compose.multiplatform.yml— Compose override file that addsplatforms: [linux/amd64, linux/arm64]to all four service build configs (backend, poller, frontend, transcription). Includes usage instructions and buildx setup requirement.Modified:
docker-compose.yml— Removed hardcodedplatformsdirectives from all four services. This allowsdocker compose buildto target the host architecture by default, improving build speed for local development.Modified:
Makefile— Updated build targets:buildtarget now runsdocker compose buildwithoutsetup-buildxdependency (faster for local dev)build-multiplatformtarget runssetup-buildxthen builds with the override file for registry pushessetup-buildxdependency fromprodanddevtargets (no longer needed for single-arch builds)Implementation Details
The multi-platform override pattern follows Docker Compose best practices: the base
docker-compose.ymldefines the core service structure, anddocker-compose.multiplatform.ymllayers platform-specific build directives on top. This is invoked via:Or via the convenience target:
The
setup-buildxtarget (which registers QEMU binfmt handlers) is now only required when explicitly building multi-platform images, not for routine development or production startup.https://claude.ai/code/session_011q11kw1s43qRJM8DYZjyHx