afk but typically you dont need a Dockerfile per arch
Looking for someone who knows about building docker images for arm64 and amd64 to review this PR
https://github.com/fiatjaf/narr/pull/3
If this is good then I can continue working on package nostr:npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6 narr app for Umbrel and start9
Discussion
I this case I did though because I need some additional dependencies for the arm64 build, and I had to pass a few extra flags to the go build command to make it happy :)
You could probably use the TARGETARCH arg to conditionally install it.
Something like this might work:
RUN [ "$TARGETARCH" != "arm64" ] || apt-get install -y gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu
Another strategy is to have both platforms defined in the same Dockerfile and then use the BUILDARCH and TARGETARCH arguments to select the correct one. That's what I'm doing for the Helipad Dockerfile: https://github.com/Podcastindex-org/helipad/blob/main/Dockerfile