#oit## This file is managed by the OpenShift Image Tool: https://github.com/openshift/enterprise-images
#oit## by the OpenShift Continuous Delivery team (#aos-cd-team on IRC).
#oit## 
#oit## Any yum repos listed in this file will effectively be ignored during CD builds.
#oit## Yum repos must be enabled in the oit configuration files.
#oit## The content of this file is managed from an external source.
#oit## Changes made directly in distgit will be lost during the next
#oit## reconciliation process.
#oit## 
FROM openshift3/ose-base:v3.11.16.20180926.221407

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 erase -y golang make && yum clean all


# doesn't require a root user.
USER 1001

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

LABEL \
        io.k8s.description="This is a component that exposes metrics about Kubernetes objects." \
        com.redhat.component="kube-state-metrics-container" \
        maintainer="Frederic Branczyk <fbranczy@redhat.com>" \
        name="openshift3/ose-kube-state-metrics" \
        License="GPLv2+" \
        io.k8s.display-name="kube-state-metrics" \
        version="v3.11.16" \
        vendor="Red Hat" \
        io.openshift.tags="kubernetes"

