Run ARM Docker images in GitHub Actions runners!
This is so easy to do, I think I can describe it in less than 150 words!
Problem: You want to run Docker images from Docker images that target ARM, or you want to build images for ARM platforms.
Solution: Add this to .github/workflows/main.yml
(or whichever YAML file
you’d like to enable ARM support for):
jobs:
your-job-name:
steps:
# Add this to the top of your `steps`
- name: Set up QEMU - arm
if: ${{ runner.arch == 'X86' || runner.arch == 'X64' }}
id: qemu-arm64
uses: docker/setup-qemu-action@v1
with:
image: tonistiigi/binfmt:latest
platforms: arm64
- name: Set up QEMU - x86
if: ${{ runner.arch == 'ARM64' }}
id: qemu-x86_64
uses: docker/setup-qemu-action@v1
with:
image: tonistiigi/binfmt:latest
platforms: x86_64
That’s it!