Add multi-platform Docker support for ARM64 compatibility #18
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.
This PR resolves the "exec format error" issue encountered when running the Atlas Docker container on ARM64 systems (Raspberry Pi, Apple Silicon, etc.). The error occurred because the Docker image was only built for linux/amd64 architecture.
Changes Made
Multi-Platform Dockerfile Support
--platform=$BUILDPLATFORMsupport to the builder stage for proper cross-compilationgcc-aarch64-linux-gnufor CGO support (required by sqlite3)TARGETOSandTARGETARCHhandling for both amd64 and arm64 buildsEnhanced Deployment Script
deploy.shto use Docker Buildx for multi-platform buildslinux/amd64andlinux/arm64architecturesDocumentation Updates
Technical Details
The solution uses Docker's multi-platform build capabilities with QEMU emulation to create native binaries for both x86_64 and ARM64 architectures. The Go binary is cross-compiled with proper CGO support for sqlite3, ensuring the application works correctly on both platforms without runtime emulation overhead.
Testing
Users on ARM64 systems will no longer encounter the "exec format error" and can run Atlas containers natively without platform mismatch warnings.
Fixes #16.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
1.0.17.172.in-addr.arpanmap -sn 172.17.0.2/16(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.