FROM rust:buster as builder WORKDIR /app VOLUME \ /app/target \ /usr/local/cargo/registry COPY . . RUN cargo install --path . FROM debian:buster-slim WORKDIR /app RUN apt-get update \ && apt-get install -y openssl \ && rm -rf /var/lib/apt/lists/* COPY --from=builder \ /usr/local/cargo/bin/admin \ /usr/local/cargo/bin/server \ /usr/local/bin/ CMD ["server"]