Skip to content

Add buildx-compatible multi-arch Docker build for amd64 and arm64#100

Open
dahu33 wants to merge 2 commits intoattestantio:masterfrom
curvegrid:dockerfile-multi-arch
Open

Add buildx-compatible multi-arch Docker build for amd64 and arm64#100
dahu33 wants to merge 2 commits intoattestantio:masterfrom
curvegrid:dockerfile-multi-arch

Conversation

@dahu33
Copy link
Copy Markdown

@dahu33 dahu33 commented Mar 29, 2026

Summary

This PR updates the Docker build so the image can be built for both linux/amd64 and linux/arm64 with docker buildx.

This partially resolves #96.

What changed

  • build the Go builder stage on $BUILDPLATFORM
  • select the appropriate C cross-compiler based on BUILDARCH/TARGETARCH
  • keep the same-arch path on the native compiler
  • keep the runtime image on debian:bookworm-slim so the PR does not introduce a breaking runtime-base change
  • tighten .dockerignore so local binaries, VCS metadata, and editor noise are not sent in the Docker build context

Scope note

This PR only addresses Dockerfile-level multi-arch compatibility.

The arm64/multi-arch behavior comes from the builder-stage and cross-compilation changes. The earlier distroless runtime switch has been reverted because it is an independent breaking change and should not be bundled into this PR.

I could not find the image publish automation in this repository, so this does not update the build-and-push path for the published Docker image. If publishing is handled externally, that external pipeline will still need to build and publish a multi-arch manifest for the arm64 image to appear publicly.

Verification

  • docker buildx build --platform linux/amd64 --output type=cacheonly .
  • docker buildx build --platform linux/arm64 --output type=cacheonly .

@dahu33
Copy link
Copy Markdown
Author

dahu33 commented Apr 7, 2026

@Bez625 @AntiD2ta any chance someone from your team could review this PR? Thank you!

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.

Docker image missing arm64 architecture

1 participant