Skip to content

Use native ARM runners instead of QEMU for multi-arch Docker builds #1019

@dpark01

Description

@dpark01

Summary

Currently our Docker builds use QEMU emulation for ARM64 builds (via docker/setup-qemu-action). This is slow—ARM builds under QEMU can be 5-10x slower than native execution.

Proposed Solution

Split each multi-arch build into two parallel jobs running on native architecture runners, then combine with a manifest:

Build Phase (parallel per image)

  • AMD64: Run on ubuntu-latest (x86_64), push image with -amd64 suffix
  • ARM64: Run on ubuntu-24.04-arm (native ARM runner), push image with -arm64 suffix

Manifest Phase (after builds complete)

Use docker buildx imagetools create to combine the arch-specific images into a single multi-arch manifest:

- name: Create multi-arch manifest
  run: |
    docker buildx imagetools create -t $QUAY_REPO:tag \
      $QUAY_REPO:tag-amd64 \
      $QUAY_REPO:tag-arm64

Benefits

  • Faster builds: Native ARM execution vs QEMU emulation
  • Better parallelism: Both arches build simultaneously
  • More reliable: QEMU can have compatibility issues with some packages

Affected Jobs

All multi-arch build jobs in .github/workflows/docker.yml:

  • build-baseimage
  • build-core
  • build-derivatives (assemble, classify, phylo)
  • build-mega

Considerations

  • GitHub ARM runners may have different pricing/availability
  • Need to handle the manifest creation step carefully for PRs (where we don't push)
  • Cache strategy may need adjustment for per-arch caches

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions