gbip / sentry_tunnel

Proxy sentry request to a sentry server using a tunnel/proxy endpoint
BSD 2-Clause "Simplified" License
33 stars 12 forks source link

Use alpine build image for easier platform support #19

Open riconnon opened 7 months ago

riconnon commented 7 months ago

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 Dockerfile in 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 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).