Files
monzo-ingestion/Dockerfile
T
2024-10-16 13:39:46 +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:bullseye-slim
COPY --from=platform_determiner /usr/bin/monzo-ingestion /usr/local/bin/monzo-ingestion
ENTRYPOINT ["/usr/local/bin/monzo-ingestion"]