FROM openshift3/ose-base:v3.11.664.20220323.101621
ENV __doozer=update BUILD_RELEASE=1.gb7c6d38 BUILD_VERSION=v3.11.664 OS_GIT_MAJOR=3 OS_GIT_MINOR=11 OS_GIT_PATCH=664 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=3.11.664-1.gb7c6d38 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=b7c6d38 OS_GIT_VERSION=3.11.664-1.gb7c6d38-b7c6d38 SOURCE_DATE_EPOCH=1544287845 SOURCE_GIT_COMMIT=b7c6d38314f817fa9bd8adbfdf425f8ba3f239c5 SOURCE_GIT_TAG=v1.0.0-257-gb7c6d383 SOURCE_GIT_URL=https://github.com/openshift/kube-state-metrics 

ENV GOPATH /go
RUN mkdir $GOPATH

COPY . $GOPATH/src/k8s.io/kube-state-metrics

RUN yum install -y golang make git && \
   cd $GOPATH/src/k8s.io/kube-state-metrics && cat Makefile && \
   make build && cp $GOPATH/src/k8s.io/kube-state-metrics/kube-state-metrics /usr/bin/ && \
   yum autoremove -y golang make git && yum clean all


# doesn't require a root user.
USER 1001

ENTRYPOINT ["/usr/bin/kube-state-metrics"]

LABEL \
        io.k8s.display-name="kube-state-metrics" \
        io.k8s.description="This is a component that exposes metrics about Kubernetes objects." \
        io.openshift.tags="kubernetes" \
        maintainer="Frederic Branczyk <fbranczy@redhat.com>" \
        License="ASL 2.0" \
        vendor="Red Hat" \
        name="openshift3/ose-kube-state-metrics" \
        com.redhat.component="kube-state-metrics-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Monitoring" \
        release="1.gb7c6d38" \
        io.openshift.build.commit.id="b7c6d38314f817fa9bd8adbfdf425f8ba3f239c5" \
        io.openshift.build.source-location="https://github.com/openshift/kube-state-metrics" \
        io.openshift.build.commit.url="https://github.com/openshift/kube-state-metrics/commit/b7c6d38314f817fa9bd8adbfdf425f8ba3f239c5" \
        version="v3.11.664"

