FROM rust:1.85 AS builder
WORKDIR /build
COPY Cargo.toml Cargo.lock ./
COPY src/ src/
RUN cargo build --release --bin soju-operator

FROM registry.access.redhat.com/ubi9-minimal:latest
COPY --from=builder /build/target/release/soju-operator /usr/local/bin/soju-operator
ENTRYPOINT ["soju-operator"]
