This repository has been archived on 2024-08-23. You can view files and clone it, but cannot push or open issues or pull requests.
project/Dockerfile
2024-08-15 20:41:59 +03:00

20 lines
365 B
Docker

FROM rust:slim AS chef
RUN cargo install cargo-chef
WORKDIR /app
FROM chef AS planner
COPY . .
RUN cargo chef prepare
FROM chef AS builder
COPY --from=planner /app/recipe.json recipe.json
RUN cargo chef cook --release
COPY . .
RUN cargo b -r
FROM debian:stable-slim
EXPOSE 3000
WORKDIR /app
COPY --from=builder /app/target/release/project .
CMD [ "./project" ]