ci: optimize docker img size

hopefully
This commit is contained in:
jabuxas 2025-02-11 00:43:52 -03:00
parent 171aedb8b0
commit 49a4cf6345

View File

@ -1,9 +1,12 @@
FROM rustlang/rust:nightly-slim
FROM rustlang/rust:nightly-slim as builder
WORKDIR /app
RUN rustup target add x86_64-unknown-linux-musl
COPY . .
RUN cargo build --release --bin refinement
RUN cargo build --release --target=x86_64-unknown-linux-musl --bin refinement
CMD ["target/release/refinement"]
FROM scratch
COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/refinement /refinement
CMD ["/refinement"]