Use alpine build image for easier platform support#19
Open
Use alpine build image for easier platform support#19
Conversation
The existing docker image cannot easily be built for multi-arch using `docker buildx` or similar since it encodes the Rust target architecture using the `ARCH` build-arg. `docker buildx` provides the target architecture using the `TARGETARCH` build-arg but uses `amd64` and `arm64` compared to Rust using `x86_64` and `aarch64`. To make this easier I've changed the builder image to the Alpine based version so that `--target` is not required to produce a static musl-based binary (since it's the default on Alpine).
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.
This is a bit of a speculative PR that relates to, but doesn't completely solve, #18
I spent a bit of time producing my own multi-architecture images for this project and ended up using this
Dockerfilein place of the original one. Wondered if you'd consider accepting it upstream since it's also a fair bit simpler/smaller than the existing one.The existing docker image cannot easily be built for multi-arch using
docker buildxor similar since it encodes the Rust target architecture using theARCHbuild-arg.docker buildxprovides the target architecture using theTARGETARCHbuild-arg but usesamd64andarm64compared to Rust usingx86_64andaarch64. To make this easier I've changed the builder image to the Alpine based version so that--targetis not required to produce a static musl-based binary (since it's the default on Alpine).