peazyrsa/Dockerfile

22 lines
610 B
Docker
Raw Permalink Normal View History

2024-10-19 21:13:57 +00:00
FROM lukemathwalker/cargo-chef:latest-rust-1 AS chef
WORKDIR /app
2024-10-22 13:13:44 +00:00
RUN apt --no-install-recommends update && apt install -y libssl-dev
2024-10-19 21:13:57 +00:00
FROM chef AS planner
COPY . .
RUN cargo chef prepare --recipe-path recipe.json
FROM chef AS builder
COPY --from=planner /app/recipe.json recipe.json
RUN cargo chef cook --release --recipe-path recipe.json
COPY . .
RUN cargo build --release
FROM debian:12-slim AS runtime
ARG SSL_PKG="openssl"
RUN apt update && apt install -y $SSL_PKG
WORKDIR /app
COPY --from=builder /app/target/release/peazyrsa /usr/local/bin
ENTRYPOINT ["/usr/local/bin/peazyrsa"]