Skip to content

Decouple multi-platform builds from default docker-compose config#93

Merged
d3mocide merged 1 commit into
mainfrom
claude/affectionate-pasteur-l5hEJ
May 31, 2026
Merged

Decouple multi-platform builds from default docker-compose config#93
d3mocide merged 1 commit into
mainfrom
claude/affectionate-pasteur-l5hEJ

Conversation

@d3mocide
Copy link
Copy Markdown
Owner

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 adds platforms: [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 hardcoded platforms directives from all four services. This allows docker compose build to target the host architecture by default, improving build speed for local development.

  • Modified: Makefile — Updated build targets:

    • build target now runs docker compose build without setup-buildx dependency (faster for local dev)
    • New build-multiplatform target runs setup-buildx then builds with the override file for registry pushes
    • Removed setup-buildx dependency from prod and dev targets (no longer needed for single-arch builds)

Implementation Details

The multi-platform override pattern follows Docker Compose best practices: the base docker-compose.yml defines the core service structure, and docker-compose.multiplatform.yml layers platform-specific build directives on top. This is invoked via:

docker compose -f docker-compose.yml -f docker-compose.multiplatform.yml build

Or via the convenience target:

make build-multiplatform

The setup-buildx target (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

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
@d3mocide d3mocide merged commit 14e383a into main May 31, 2026
6 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.

2 participants