bfile/filed/Dockerfile.prod

17 lines
313 B
Docker
Raw Normal View History

2023-09-29 12:56:35 +02:00
# --- build ---
FROM rust:alpine as builder
WORKDIR /opt/build
COPY . .
RUN apk add --no-cache musl-dev upx
2023-09-29 12:56:35 +02:00
RUN cargo b -r
RUN strip target/release/filed && upx --best target/release/filed
2023-09-29 12:56:35 +02:00
# --- deploy ---
FROM busybox:musl
2023-09-29 12:56:35 +02:00
COPY --from=builder /opt/build/target/release/filed /bin/filed
2023-09-29 12:58:13 +02:00
CMD [ "/bin/filed" ]