Some checks failed
Build and Publish / Build and Test (push) Failing after 6m19s
15 lines
539 B
Docker
15 lines
539 B
Docker
FROM --platform=$BUILDPLATFORM debian:bullseye-slim 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-gnu/release/toggl-bridge" ;; \
|
|
*) exit 1 ;; \
|
|
esac && \
|
|
mv "$BINARY_PATH" /usr/local/bin/toggl-bridge
|
|
|
|
FROM --platform=$TARGETPLATFORM debian:bullseye-slim
|
|
COPY --from=builder /usr/local/bin/toggl-bridge /usr/local/bin/
|
|
CMD ["toggl-bridge"]
|