monzo-ingestion/Dockerfile
Joshua Coles 7f78d2274c
All checks were successful
Build and Publish / Build and Test (push) Successful in 2m24s
Update debian version
2024-10-16 13:57:08 +01:00

15 lines
599 B
Docker

FROM busybox AS platform_determiner
ARG TARGETPLATFORM
ARG BINARY_NAME
COPY /target /target
RUN case "$TARGETPLATFORM" in \
"linux/amd64") BINARY_PATH="/target/release/${BINARY_NAME}" ;; \
"linux/arm64") BINARY_PATH="/target/aarch64-unknown-linux-musl/release/${BINARY_NAME}" ;; \
*) exit 1 ;; \
esac && mv "$BINARY_PATH" "/usr/bin/monzo-ingestion" && chmod +x "/usr/bin/monzo-ingestion"
FROM --platform=$TARGETPLATFORM debian:bookworm-slim
COPY --from=platform_determiner /usr/bin/monzo-ingestion /usr/local/bin/monzo-ingestion
ENTRYPOINT ["/usr/local/bin/monzo-ingestion"]