ARG BUILDER_IMAGE
ARG BASE_IMAGE

FROM --platform=${BUILDPLATFORM} ${BUILDER_IMAGE} as SRC

FROM ${BASE_IMAGE:-registry.access.redhat.com/ubi8/ubi-minimal:latest}

WORKDIR /
COPY --from=SRC /manager .

# Update image
RUN microdnf update

USER 65532:65532

# Port for metrics and probes
EXPOSE 9090

ENTRYPOINT ["/manager"]
