FROM rust:1.88 AS build
WORKDIR /src
COPY Cargo.toml Cargo.lock ./
COPY crates/ crates/
RUN cargo build --release -p bouncer-webhook

FROM registry.access.redhat.com/ubi9-minimal
COPY --from=build /src/target/release/bouncer-webhook /usr/local/bin/
EXPOSE 8443
CMD ["bouncer-webhook"]
