Skip to content

Add linux/arm64 architecture support to Docker image #8

@barryw

Description

@barryw

Summary

The current Docker image only supports linux/amd64 architecture. On Apple Silicon Macs and ARM-based Linux servers/CI runners, this requires Rosetta/QEMU emulation which causes compatibility issues with .NET networking.

Current Behavior

$ docker run --rm ghcr.io/barryw/sim6502:v3.10.0 --version
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested

When using --backend vice, the emulated .NET HttpClient fails to connect to host services even though network connectivity exists (verified with wget).

Proposed Solution

Build and publish multi-architecture Docker images supporting both:

  • linux/amd64
  • linux/arm64

This can be achieved with Docker buildx:

# In GitHub Actions workflow
- name: Set up QEMU
  uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
  uses: docker/setup-buildx-action@v3

- name: Build and push
  uses: docker/build-push-action@v5
  with:
    platforms: linux/amd64,linux/arm64
    push: true
    tags: ghcr.io/barryw/sim6502:${{ github.ref_name }}

Benefits

  1. Native execution on Apple Silicon Macs (M1/M2/M3)
  2. Native execution on ARM-based CI runners (GitHub Actions larger runners, AWS Graviton)
  3. Eliminates .NET HttpClient issues under emulation
  4. Better performance (no emulation overhead)

Related

This issue is related to #7 (AOT binaries). Both solutions address the same root problem - native ARM64 support for local development and CI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions