FROM openshift3/ose-base:v3.11.154.20191104.121953
ENV BUILD_VERSION=v3.11.154
ENV SOURCE_GIT_COMMIT=0aebafcad0c39daf259bf9600a81df0af1f1e87e SOURCE_DATE_EPOCH=1571390533 BUILD_VERSION=v3.11.154 SOURCE_GIT_URL=https://github.com/openshift/cluster-monitoring-operator SOURCE_GIT_TAG=v3.11.0-51-g0aebafc BUILD_RELEASE=1

ENV GOPATH /go
ENV PATH="${PATH}:${GOPATH}/bin"
RUN mkdir $GOPATH

COPY . $GOPATH/src/github.com/openshift/cluster-monitoring-operator

RUN yum install -y golang make git && \
    cd $GOPATH/src/github.com/openshift/cluster-monitoring-operator && \
    make operator-no-deps && cp $GOPATH/src/github.com/openshift/cluster-monitoring-operator/operator /usr/bin/ && \
    yum autoremove -y golang make git && yum clean all


# doesn't require a root user.
USER 1001

ENTRYPOINT ["/usr/bin/operator"]

LABEL \
        io.k8s.description="This is a component of OpenShift Container Platform and manages the lifecycle of the Prometheus based cluster monitoring stack." \
        com.redhat.component="cluster-monitoring-operator-container" \
        maintainer="Frederic Branczyk <fbranczy@redhat.com>" \
        name="openshift3/ose-cluster-monitoring-operator" \
        License="ASL 2.0" \
        io.k8s.display-name="OpenShift cluster-monitoring-operator" \
        io.openshift.build.source-location="https://github.com/openshift/cluster-monitoring-operator" \
        io.openshift.build.commit.url="https://github.com/openshift/cluster-monitoring-operator/commit/0aebafcad0c39daf259bf9600a81df0af1f1e87e" \
        version="v3.11.154" \
        io.openshift.build.commit.id="0aebafcad0c39daf259bf9600a81df0af1f1e87e" \
        vendor="Red Hat" \
        io.openshift.tags="openshift"

