FROM openshift/golang-builder:1.12 AS builder
ENV __doozer=update BUILD_RELEASE=202005041055 BUILD_VERSION=v4.3.19 OS_GIT_MAJOR=4 OS_GIT_MINOR=3 OS_GIT_PATCH=19 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.3.19-202005041055 
ENV __doozer=merge OS_GIT_COMMIT=83f9fc5 OS_GIT_VERSION=4.3.19-202005041055-83f9fc5 SOURCE_DATE_EPOCH=1570609805 SOURCE_GIT_COMMIT=83f9fc5685cf3d7732687e1f07da6b27d6901c4f SOURCE_GIT_TAG=83f9fc56 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.3.19.20200504.105538
ENV __doozer=update BUILD_RELEASE=202005041055 BUILD_VERSION=v4.3.19 OS_GIT_MAJOR=4 OS_GIT_MINOR=3 OS_GIT_PATCH=19 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.3.19-202005041055 
ENV __doozer=merge OS_GIT_COMMIT=83f9fc5 OS_GIT_VERSION=4.3.19-202005041055-83f9fc5 SOURCE_DATE_EPOCH=1570609805 SOURCE_GIT_COMMIT=83f9fc5685cf3d7732687e1f07da6b27d6901c4f SOURCE_GIT_TAG=83f9fc56 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" \
        version="v4.3.19" \
        release="202005041055" \
        io.openshift.build.commit.id="83f9fc5685cf3d7732687e1f07da6b27d6901c4f" \
        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/83f9fc5685cf3d7732687e1f07da6b27d6901c4f"

