Docker Compose Tip #23: Multi-platform builds with platforms
Build once, run everywhere! Create images that work on ARM Macs, Intel servers, and Raspberry Pi with a single build command. Configure multi-arch builder Docker Desktop handles this by default. For other Docker installations, set up buildx: # Only needed if not using Docker Desktop # Create and use a new builder docker buildx create --name multiarch --use # Verify available platforms docker buildx ls Configure platforms Specify target architectures in your compose file: ...