toggl-bridge/Dockerfile
Joshua Coles ff31e6ab8f
Some checks failed
Rust CI / Build and Test (push) Failing after 10m16s
Make simple docker containers from the build artefact
2024-08-01 23:03:11 +01:00

15 lines
518 B
Docker

FROM --platform=$BUILDPLATFORM debian:buster-slim AS builder
ARG TARGETPLATFORM
WORKDIR /app
COPY . .
RUN case "$TARGETPLATFORM" in \
"linux/amd64") BINARY_PATH="target/release/toggl-bridge" ;; \
"linux/arm64") BINARY_PATH="target/aarch64-unknown-linux-gnu/release/toggl-bridge" ;; \
*) exit 1 ;; \
esac && \
mv "$BINARY_PATH" /usr/local/bin/toggl-bridge
FROM --platform=$TARGETPLATFORM debian:buster-slim
COPY --from=builder /usr/local/bin/toggl-bridge /usr/local/bin/
CMD ["toggl-bridge"]