toggl-bridge/Dockerfile
Joshua Coles ad91412661
All checks were successful
Build and Publish / Build and Test (push) Successful in 5m49s
Change to alpine images
2024-09-17 23:28:54 +01:00

15 lines
512 B
Docker

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