FROM openshift/ose-cli:v4.4 as builder

COPY ocs-operator-release_4.4-3e9b7a50.tar.gz /ocs-operator.tar.gz

RUN \
    cd / && \
    tar -xzf /ocs-operator.tar.gz && \
    rm /ocs-operator.tar.gz

FROM ubi8:8-released
RUN dnf install -y tar rsync findutils gzip iproute tcpdump pciutils util-linux nftables

# Copy oc binary
COPY --from=builder /usr/bin/oc /usr/bin/oc

# Copy all collection scripts to /usr/bin
COPY --from=builder /must-gather/collection-scripts/* /usr/bin/

# Copy the templates
COPY --from=builder /must-gather/templates/* /templates/

ENTRYPOINT /usr/bin/gather

LABEL com.redhat.component="ocs-must-gather-container"
LABEL name="ocs-must-gather"
LABEL version="4.4"
LABEL release="24.3e9b7a50.release_4.4"
LABEL summary="OCS data gathering image"
LABEL io.openshift.expose-services=""
LABEL io.openshift.tags="ocs"
LABEL io.k8s.display-name="ocs-must-gather"
LABEL maintainer="Boris Ranto <branto@redhat.com>"
LABEL description="OCS data gathering image"
LABEL ocs.tags="v4.4"
LABEL upstream-vcs-ref="3e9b7a502f9d7ecd311cffe47400ad89d4c2b16c"
