FROM lukemathwalker/cargo-chef:latest-rust-1.91.1-slim-trixie AS chef WORKDIR /app FROM chef AS planner COPY Cargo.toml Cargo.lock ./ COPY crates/ ./crates/ RUN cargo chef prepare --recipe-path recipe.json FROM chef AS dependencies COPY --from=planner /app/recipe.json recipe.json RUN apt-get update && apt-get install -y \ pkg-config \ libpq-dev \ liblua5.3-dev \ lua5.3 \ wget \ && rm -rf /var/lib/apt/lists/* RUN cargo chef cook --release --recipe-path recipe.json FROM dependencies AS base