BM: Baca dalam Bahasa Melayu
World C2: Container Pipelines
Multi-arch builds in CI
You will learn: to build one image for both Intel and Arm computers.
Checked with GitHub Actions 2026-10 on 31 Oct 2026
The problem
Your image runs on the shop’s Intel server. On a new Arm server it stops at once: exec format error. Why?
Pick one answer.
Watch
Tap the line that asks for two CPU types.
0 of 1 found
A multi-arch image: One image name with a pack for each CPU type, like amd64 and arm64. is one name with a pack for each CPU. Each computer pulls the pack that fits it.
Try it
Press Run. The arm64 pack fails on this Intel runner. Pick a fix for the yellow line.
The line is red. Fix the yellow lines, then run again.
Workflow file .github/workflows/image.yml
name: Image on: push: branches: [main] permissions: contents: read jobs: image: runs-on: ubuntu-latest steps: - uses: docker/setup-buildx-action@v4 - uses: docker/build-push-action@v7 with: tags: kedai-kancil:ci platforms: linux/amd64,linux/arm64
Yellow: lines 11–11. You can change these.
The line
Push to main · main
Hint
The runner needs an adapter that can pretend to be Arm.Predict
QEMU: An adapter that lets one CPU type pretend to be another. Slower, but it works. is that adapter: the Intel worker cooks for the Arm stove. What is the catch?
Pick one answer.
Check
Which pack does each computer pull?
Drag a card into a box. Or tap the card, then tap the box.
You did it!
You can now build one image for Intel and Arm computers.
Go deeper (optional)
GitHub also has Arm runners, like ubuntu-24.04-arm. They build arm64 natively, with no QEMU, so they are faster. docker buildx imagetools inspect <image> lists the packs inside one name.
Real rep (optional), in a public practice repo:
Real mission
docker buildx imagetools inspect ghcr.io/YOUR-NAME/YOUR-REPO:main
0 of 3 steps done · Your ticks are saved.
Bahasa Melayu
Image anda jalan di server Intel kedai. Di server Arm yang baru, ia terus berhenti: exec format error. Kenapa?
Image multi-arch ialah satu nama dengan satu pek untuk setiap CPU. Setiap komputer tarik pek yang sesuai dengannya.
Tekan Run. Pek arm64 gagal di runner Intel ini. Pilih pembaikan untuk baris kuning.
QEMU ialah penyesuai itu: pekerja Intel masak untuk dapur Arm. Apa kekurangannya?
Komputer mana tarik pek mana?
Kini anda boleh bina satu image untuk komputer Intel dan Arm.
You finished this before. Practice is always welcome!
Official docs: Docker docs: multi-platform image with GitHub Actions · docker/setup-qemu-action · Docker docs: multi-platform builds
You've learned for 25 minutes. A short break helps your brain.
Sprint done! Great focus. Stretch for a minute?