FROM openshift-ose-must-gather:v4.4.0 AS builder

FROM registry.redhat.io/ubi8/ubi-minimal

RUN microdnf install -y rsync tar

COPY --from=builder /usr/bin/oc /usr/bin/oc
COPY --from=builder /usr/bin/gather /usr/bin/gather_original

# Copy all collection scripts to /usr/bin
COPY bin/* /usr/bin/

ENTRYPOINT /usr/bin/gather

LABEL com.redhat.component="openshift-serverless-1-must-gather-rhel8-container" \
      name="openshift-serverless-1/svls-must-gather-rhel8" \
      version="1.10.1" \
      summary="Red Hat OpenShift Serverless 1 Must Gather" \
      maintainer="serverless-support@redhat.com" \
      description="Red Hat OpenShift Serverless 1 Must Gather" \
      io.k8s.display-name="Red Hat OpenShift Serverless 1 Must Gather"
