Publish multi-arch (amd64 + arm64) container images#82
Merged
Conversation
Adds linux/arm64 to the published image so Apple Silicon developers can run the operator locally without QEMU. - Dockerfile: pin builder to BUILDPLATFORM and cross-compile to TARGETARCH so arm64 builds run natively on amd64 runners (and vice versa) instead of under emulation. - Dockerfile: stamp version metadata into the binary via -ldflags using the VERSION/GIT_COMMIT/GIT_TREE_STATE/BUILD_DATE build args the shared publish workflow already provides. - cmd/main.go: log the stamped build metadata on startup. - publish.yaml: bump the shared publish-docker workflow to v1.13.1 and request linux/amd64,linux/arm64. Verified locally with docker buildx: cold multi-arch build is ~47s, warm rebuild is ~7s, both architectures cross-compile natively. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ecv
approved these changes
Apr 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The published
ghcr.io/datum-cloud/workload-operatorimage is currently built forlinux/amd64only. That blocks anyone running the downstream e2e environments on Apple Silicon — Docker has to fall back to emulation, which is slow and unreliable.This PR publishes the image for both
linux/amd64andlinux/arm64so the same image runs natively on both architectures. Pulling by tag continues to work exactly as before; consumers automatically get the right variant for their machine.Why it's fast
A previous attempt at this reportedly took 15+ minutes per build because the builder was running under emulation. This PR teaches the build to cross-compile natively instead, which is the standard fast path for pure-Go projects. Locally verified with
docker buildx:That's roughly the same as today's amd64-only build, with arm64 added effectively for free.
As a small bonus, the binary now records its version, git commit, git tree state, and build date, and logs them on startup — useful for debugging which image is actually running in a cluster.
Backwards compatibility
ghcr.io/datum-cloud/workload-operator:<tag>continues to work and now transparently gets the right architecture.make docker-buildis unchanged and still produces a host-architecture image for development.datum-cloud/actionsv1.5.1 → v1.13.1), which slightly changes how non-release tags are formatted (e.g. branch and SHA tags are now prefixed withv0.0.0-so they're semver-compatible). Anything pinning the old branch/SHA tag formats may need a small follow-up.Test plan
ghcr.io/datum-cloud/workload-operator:<branch-tag>docker buildx imagetools inspect ghcr.io/datum-cloud/workload-operator:<tag>shows bothlinux/amd64andlinux/arm64🤖 Generated with Claude Code