#@follow_tag(registry.redhat.io/openshift4/ose-must-gather:v4.6.0)
FROM registry.redhat.io/openshift4/ose-must-gather:v4.6.0-202011041933.p0

RUN dnf install -y tar rsync findutils gzip iproute tcpdump pciutils util-linux nftables hostname

COPY cnv-must-gather-*.tar.gz /must-gather/

RUN tar -C /must-gather --strip-components 1 -xf /must-gather/cnv-must-gather-*.tar.gz && \
    rm /must-gather/cnv-must-gather-*.tar.gz && \
    mv /usr/bin/gather{,_original} && \
    cp /must-gather/collection-scripts/* /usr/bin && \
    cp /must-gather/node-gather/node-gather*.yaml /etc

ENTRYPOINT /usr/bin/gather

LABEL com.redhat.component="cnv-must-gather-container" \
      name="container-native-virtualization/cnv-must-gather-rhel8" \
      version="v2.5.2" \
      release="2" \
      summary="CNV data gathering image" \
      io.openshift.expose-services="" \
      io.openshift.tags="data,images" \
      io.k8s.display-name="cnv-must-gather" \
      maintainer="The KubeVirt Project <kubevirt-dev@googlegroups.com" \
      description="CNV data gathering image"
