FROM rust:1.88 AS builder
WORKDIR /build
COPY Cargo.toml Cargo.lock ./
COPY crates/ crates/
RUN cargo build --release -p platform-operator

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