FROM rust:1.84-bookworm AS builder WORKDIR /app COPY Cargo.toml Cargo.lock rust-toolchain.toml ./ COPY src ./src RUN rustup component add rustfmt clippy && \ cargo fmt --check && \ cargo check && \ cargo test && \ cargo clippy --all-targets --all-features -- -D warnings && \ cargo build --release FROM debian:bookworm-slim RUN apt-get update && apt-get install -y \ util-linux \ mount \ && rm -rf /var/lib/apt/lists/* COPY --from=builder /app/target/release/wipe /usr/local/bin/wipe ENTRYPOINT ["wipe"] CMD ["--help"]