Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 21, 2025

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

  • Added --platform=$BUILDPLATFORM support to the builder stage for proper cross-compilation
  • Implemented ARM64 cross-compilation with gcc-aarch64-linux-gnu for CGO support (required by sqlite3)
  • Added SSL certificate workarounds for CI environments to handle Go module downloads
  • Maintained proper TARGETOS and TARGETARCH handling for both amd64 and arm64 builds

Enhanced Deployment Script

  • Updated deploy.sh to use Docker Buildx for multi-platform builds
  • Automated buildx builder creation with platform support
  • Combined build and push operations for both linux/amd64 and linux/arm64 architectures
  • Maintained backward compatibility with existing single-platform deployments

Documentation Updates

  • Added multi-platform support information to README deployment section
  • Updated CI/CD documentation to reflect new cross-platform capabilities

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

  • Verified single-platform builds work correctly
  • Confirmed multi-platform build setup with QEMU emulation
  • Tested container startup and basic functionality
  • Validated ARM64 cross-compilation produces working binaries

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.arpa
    • Triggering command: nmap -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.

Copy link
Contributor Author

Copilot AI commented Sep 21, 2025

@karam-ajaj 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

Copilot AI changed the title [WIP] Not running Add multi-platform Docker support for ARM64 compatibility Sep 21, 2025
Copilot AI requested a review from karam-ajaj September 21, 2025 22:10
@telnetdoogie
Copy link

My suggestion would be to just move to using a github action for publishing multi-arch docker images, and using conventional commits and semantic release for versioning.

I do this in my repos, here is an example of the multi-arch publish which ensures no arch label is required in the compose or docker run commands; they remain the same across platforms.

@scyto
Copy link

scyto commented Sep 24, 2025

My suggestion would be to just move to using a github action for publishing multi-arch docker images, and using conventional commits and semantic release for versioning.

I do this in my repos, here is an example of the multi-arch publish which ensures no arch label is required in the compose or docker run commands; they remain the same across platforms.

agreed 100% people like to make multi-arch builds way more complex than is needed

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.

Not running

4 participants