Build multi-arch images for amd64 and arm64 #1

Merged
jcoffey-dev merged 1 commits from multi-arch into main 2026-09-24 19:47:01 +00:00
Owner

The build stage now runs on the build platform and cross-compiles with GOOS/GOARCH, so one docker buildx build --platform linux/amd64,linux/arm64 produces both images without emulation.

The configuration check runs a separate native build, since an arm64 binary cannot run on an amd64 builder.

Tested: both platforms build; the arm64 binary is aarch64 with the settings compiled in; the amd64 image runs healthy and accepts mail; an empty ALLOWED_DOMAINS still fails the build. The arm64 image has not been run (no arm64 host or emulation available).

The build stage now runs on the build platform and cross-compiles with GOOS/GOARCH, so one `docker buildx build --platform linux/amd64,linux/arm64` produces both images without emulation. The configuration check runs a separate native build, since an arm64 binary cannot run on an amd64 builder. Tested: both platforms build; the arm64 binary is aarch64 with the settings compiled in; the amd64 image runs healthy and accepts mail; an empty ALLOWED_DOMAINS still fails the build. The arm64 image has not been run (no arm64 host or emulation available).
jcoffey-dev added 1 commit 2026-09-24 19:46:34 +00:00
The build stage runs on the build platform and cross-compiles for the
target, so arm64 needs no emulation. The configuration check runs a
native build, since the target binary may not run on the builder.
jcoffey-dev merged commit 9f189a86b5 into main 2026-09-24 19:47:01 +00:00
jcoffey-dev deleted branch multi-arch 2026-09-24 19:50:15 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jcoffey-dev/mailsink#1