Interview Prep/CI/CD/GitHub Actions and GitLab CI in Production

How do you build and publish a multi-arch image (amd64 and arm64) efficiently?

IntermediateProductionGitHub Actions and GitLab CI in Production
Answer

Use docker buildx with --platform linux/amd64,linux/arm64. QEMU emulation works but can be 5–10x slower for compile-heavy images; faster is native builders: run the arm64 build on an ARM runner, push per-arch tags, then combine into a manifest list with docker buildx imagetools create.

docker buildx imagetools create -t ghcr.io/acme/api:1.7.0 \
  ghcr.io/acme/api:1.7.0-amd64 ghcr.io/acme/api:1.7.0-arm64
All CI/CD questions Roadmap: GitLab CI/CD

More on GitHub Actions and GitLab CI in Production