FROM docker.io/rust:1-slim-bullseye AS build WORKDIR /build ADD Cargo.toml . ADD Cargo.lock . ADD src/ src RUN cargo build --release FROM docker.io/debian:bullseye-slim WORKDIR /app COPY --from=build /build/target/release/unwritten-application unwritten CMD ["./unwritten"]