build: Use different dockerfiles for single and multi-arch builds

This commit is contained in:
SinTan1729
2024-03-25 01:00:25 -05:00
parent 82559d38fd
commit e54aa3b33b
3 changed files with 27 additions and 1 deletions

15
Dockerfile.multiarch Normal file
View File

@@ -0,0 +1,15 @@
FROM scratch as builder-amd64
COPY ./actix/target/x86_64-unknown-linux-musl/release/chhoto-url /chhoto-url
FROM scratch as builder-arm64
COPY ./actix/target/aarch64-unknown-linux-musl/release/chhoto-url /chhoto-url
FROM scratch as builder-arm
COPY ./actix/target/armv7-unknown-linux-musleabihf/release/chhoto-url /chhoto-url
ARG TARGETARCH
FROM builder-$TARGETARCH
COPY ./resources /resources
ENTRYPOINT ["/chhoto-url"]