Add ARM64 (linux/arm64) multi-architecture Docker image support#306
Add ARM64 (linux/arm64) multi-architecture Docker image support#306sandhyaguduru wants to merge 2 commits into
Conversation
Re-enable ARM64 support using Docker Buildx and QEMU in the GitHub Actions pipeline. The build workflow now produces a multi-arch manifest covering linux/amd64 and linux/arm64. The release workflow uses `docker buildx imagetools create` to promote the full multi-arch manifest to Docker Hub instead of single-platform docker tag/push. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
SummaryThis PR enables multi-architecture Docker builds for linux/amd64 and linux/arm64 using Docker Buildx and QEMU. The build workflow now produces a multi-arch image manifest, while the release workflow uses What reviewers should knowKey changes in build.yml:
Key changes in release.yml:
Important detail: The release step does NOT rebuild the image. It assumes the multi-arch manifest is already staged in Repox from the build workflow, then uses Testing context: Existing BATS integration tests remain unchanged and will run on amd64 runners, pulling the amd64 variant automatically. The multi-arch manifest structure is transparent at pull time.
|
There was a problem hiding this comment.
LGTM! ✅
Clean implementation with no issues found. The cross-registry imagetools create promotion (Repox → Docker Hub) is the correct approach — it copies manifests and blobs across registries, so both the Repox login (stored earlier in the job) and the Docker Hub login (stored immediately before the push step) are active simultaneously in the credential store, which is exactly what imagetools create needs. Credential ordering is correct in both workflows.
Summary
linux/amd64andlinux/arm64docker buildx imagetools createto promote the full multi-arch manifest to Docker Hub, replacing the single-platformdocker tag/docker pushapproachContext
ARM64 support was previously added (Sept 2023) but removed in April 2024 (SCANCLI-141) when CI was on Cirrus CI. Since then, CI has migrated to GitHub Actions, and both base images (
alpine:3.19andamazoncorretto:21-al2023) already support ARM64 natively. The SonarScanner CLI binary (8.0.1.6346) is Java-based and platform-independent, with native ARM64 support in the current stable release.Users running on AWS Graviton (ARM64) Jenkins nodes or other ARM64 infrastructure currently cannot use the official Docker image — it crashes with
exec format error.Why this works without Dockerfile changes
alpine:3.19andamazoncorretto:21-al2023both publishlinux/arm64variantsChanges
.github/workflows/build.ymldocker/setup-qemu-actionfor cross-platform emulationdocker/setup-buildx-actionfor buildx builderdocker buildtodocker buildx build --platform linux/amd64,linux/arm64.github/workflows/release.ymldocker/setup-buildx-actionfor buildx builderdocker tag+docker pushwithdocker buildx imagetools createto copy the entire multi-arch manifest to Docker Hubdocker/login-actionfor registry authentication (consistent with build workflow)Test plan
linux/amd64andlinux/arm64docker manifest inspectshows both architectures in the image index🤖 Generated with Claude Code