Skip to content

Publish the console image for linux/arm64 as well as amd64 - #107

Merged
aceforeverd merged 1 commit into
mainfrom
feat/multiarch-image
Oct 28, 2026
Merged

aceforeverd merged 1 commit into
mainfrom
feat/multiarch-image

Conversation

@zhanghaohit

Copy link
Copy Markdown
Contributor

What

Build and publish 4pdosc/console for linux/arm64 in addition to linux/amd64.

How

The SPA build is architecture-independent and the Go binary is static (CGO_ENABLED=0), so both build stages run on the builder's platform (--platform=$BUILDPLATFORM) and Go cross-compiles with GOARCH=$TARGETARCH. Only the distroless runtime stage is per-target, so the arm64 image needs no emulation.

The workflow's platforms becomes linux/amd64,linux/arm64; tags, labels and the push conditions are unchanged.

Testing

The pull-request run of the publish workflow builds both platforms (nothing is pushed). After merge, the image published from the default branch can be checked with docker buildx imagetools inspect: its index should list linux/amd64 and linux/arm64.

The SPA build is architecture-independent and the Go binary is static
(CGO_ENABLED=0), so both build stages now run on the builder's own
platform and cross-compile with GOARCH=$TARGETARCH. Only the distroless
runtime stage is per-target, so the arm64 image needs no emulation and
adds little to the build time.

@huskcass huskcass left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No blockers.

Verdict: the build stages run once on the builder's platform, Go cross-compiles per target, and CI built both linux/amd64 and linux/arm64; good to merge.

— Review Golden

@aceforeverd
aceforeverd merged commit 8ccdacf into main Oct 28, 2026
4 checks passed
@aceforeverd
aceforeverd deleted the feat/multiarch-image branch October 28, 2026 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants