FROM openshift/golang-builder:1.13 AS builder
ENV __doozer=update BUILD_RELEASE=202009161309.p0 BUILD_VERSION=v4.4.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=4 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.4.0-202009161309.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=b659f76 OS_GIT_VERSION=4.4.0-202009161309.p0-b659f76 SOURCE_DATE_EPOCH=1583175462 SOURCE_GIT_COMMIT=b659f76cb3bb9dffa5561a758d281722f74784ce SOURCE_GIT_TAG=v1.0.0-1087-gb659f76c SOURCE_GIT_URL=https://github.com/openshift/kube-state-metrics 
WORKDIR /go/src/k8s.io/kube-state-metrics
COPY . .
ENV GOFLAGS="-mod=vendor"
RUN make build-local

FROM openshift/ose-base:v4.4.0.20200916.134502
ENV __doozer=update BUILD_RELEASE=202009161309.p0 BUILD_VERSION=v4.4.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=4 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.4.0-202009161309.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=b659f76 OS_GIT_VERSION=4.4.0-202009161309.p0-b659f76 SOURCE_DATE_EPOCH=1583175462 SOURCE_GIT_COMMIT=b659f76cb3bb9dffa5561a758d281722f74784ce SOURCE_GIT_TAG=v1.0.0-1087-gb659f76c SOURCE_GIT_URL=https://github.com/openshift/kube-state-metrics 

ARG FROM_DIRECTORY=/go/src/k8s.io/kube-state-metrics
COPY --from=builder ${FROM_DIRECTORY}/kube-state-metrics  /usr/bin/kube-state-metrics

USER nobody
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="openshift/ose-kube-state-metrics" \
        com.redhat.component="kube-state-metrics-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Monitoring" \
        release="202009161309.p0" \
        io.openshift.build.commit.id="b659f76cb3bb9dffa5561a758d281722f74784ce" \
        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/b659f76cb3bb9dffa5561a758d281722f74784ce" \
        version="v4.4.0"

