FROM docker.io/rust:1.67.0-slim-bullseye as builder RUN apt-get update -yq && \ apt install -y --no-install-recommends \ build-essential \ libssl-dev \ pkg-config \ protobuf-compiler \ libprotobuf-dev WORKDIR /src COPY . . RUN cargo build --release FROM docker.io/debian:bullseye-slim RUN apt-get update -yq && \ apt-get install -y --no-install-recommends glusterfs-client htop COPY --from=builder /src/target/release/gluster-dir-csi /usr/local/bin/gluster-dir-csi ENTRYPOINT ["/usr/local/bin/gluster-dir-csi"]