# Dockerfile used by OSBS and by prow CI.
FROM openshift/golang-builder:1.12 AS builder
ENV __doozer=update BUILD_RELEASE=202010141211.p0 BUILD_VERSION=v4.3.40 OS_GIT_MAJOR=4 OS_GIT_MINOR=3 OS_GIT_PATCH=40 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.3.40-202010141211.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=33f333e OS_GIT_VERSION=4.3.40-202010141211.p0-33f333e SOURCE_DATE_EPOCH=1594306016 SOURCE_GIT_COMMIT=33f333ed95cc1a9c5c86e6b8f57fcae1e70d4102 SOURCE_GIT_TAG=v0.20.0-1436-g33f333ed SOURCE_GIT_URL=https://github.com/openshift/prometheus-operator 
WORKDIR /go/src/github.com/coreos/prometheus-operator
COPY . .
ENV GO111MODULE=on
ENV GOFLAGS="-mod=vendor"
RUN make operator-no-deps

FROM openshift/ose-base:v4.3.40.20201014.125201
ENV __doozer=update BUILD_RELEASE=202010141211.p0 BUILD_VERSION=v4.3.40 OS_GIT_MAJOR=4 OS_GIT_MINOR=3 OS_GIT_PATCH=40 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.3.40-202010141211.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=33f333e OS_GIT_VERSION=4.3.40-202010141211.p0-33f333e SOURCE_DATE_EPOCH=1594306016 SOURCE_GIT_COMMIT=33f333ed95cc1a9c5c86e6b8f57fcae1e70d4102 SOURCE_GIT_TAG=v0.20.0-1436-g33f333ed SOURCE_GIT_URL=https://github.com/openshift/prometheus-operator 
COPY --from=builder /go/src/github.com/coreos/prometheus-operator/operator /usr/bin/
# doesn't require a root user.
USER 1001
ENTRYPOINT ["/usr/bin/operator"]

LABEL \
        io.k8s.display-name="Prometheus Operator" \
        io.k8s.description="This component manages the lifecycle and configuration of a Prometheus monitoring server as well as Prometheus Alertmanager clusters." \
        io.openshift.tags="prometheus" \
        maintainer="Frederic Branczyk <fbranczy@redhat.com>" \
        License="ASL 2.0" \
        vendor="Red Hat" \
        name="openshift/ose-prometheus-operator" \
        com.redhat.component="prometheus-operator-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Monitoring" \
        release="202010141211.p0" \
        io.openshift.build.commit.id="33f333ed95cc1a9c5c86e6b8f57fcae1e70d4102" \
        io.openshift.build.source-location="https://github.com/openshift/prometheus-operator" \
        io.openshift.build.commit.url="https://github.com/openshift/prometheus-operator/commit/33f333ed95cc1a9c5c86e6b8f57fcae1e70d4102" \
        version="v4.3.40"

