FROM openshift3/ose-base:v3.11.170.20200205.142841
ENV SOURCE_GIT_COMMIT=af73321015751b57e324f14c5d6558a1090f1d3e SOURCE_GIT_TAG=v3.11.0-60-gaf73321 SOURCE_GIT_URL=https://github.com/openshift/cluster-monitoring-operator SOURCE_DATE_EPOCH=1580114106 BUILD_VERSION=v3.11.170 BUILD_RELEASE=5

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.display-name="OpenShift cluster-monitoring-operator" \
        io.k8s.description="This is a component of OpenShift Container Platform and manages the lifecycle of the Prometheus based cluster monitoring stack." \
        io.openshift.tags="openshift" \
        maintainer="Frederic Branczyk <fbranczy@redhat.com>" \
        License="ASL 2.0" \
        vendor="Red Hat" \
        name="openshift3/ose-cluster-monitoring-operator" \
        com.redhat.component="cluster-monitoring-operator-container" \
        version="v3.11.170" \
        release="5" \
        io.openshift.build.commit.id="af73321015751b57e324f14c5d6558a1090f1d3e" \
        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/af73321015751b57e324f14c5d6558a1090f1d3e"

