# Dockerfile used by OSBS and by prow CI.
FROM openshift/golang-builder:1.13 AS builder
ENV __doozer=update BUILD_RELEASE=202103011602.p0 BUILD_VERSION=v4.5.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=5 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.5.0-202103011602.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=b452553 OS_GIT_VERSION=4.5.0-202103011602.p0-b452553 SOURCE_DATE_EPOCH=1606330706 SOURCE_GIT_COMMIT=b4525534c11bb0a4f201b3a596a91f0cf0e51171 SOURCE_GIT_TAG=v0.20.0-1721-gb4525534 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 OS=$(go env GOOS) ARCH=$(go env GOARCH) make operator-no-deps

FROM openshift/ose-base:v4.5.0-202101300210.1614612480
ENV __doozer=update BUILD_RELEASE=202103011602.p0 BUILD_VERSION=v4.5.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=5 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.5.0-202103011602.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=b452553 OS_GIT_VERSION=4.5.0-202103011602.p0-b452553 SOURCE_DATE_EPOCH=1606330706 SOURCE_GIT_COMMIT=b4525534c11bb0a4f201b3a596a91f0cf0e51171 SOURCE_GIT_TAG=v0.20.0-1721-gb4525534 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="202103011602.p0" \
        io.openshift.build.commit.id="b4525534c11bb0a4f201b3a596a91f0cf0e51171" \
        io.openshift.build.source-location="https://github.com/openshift/prometheus-operator" \
        io.openshift.build.commit.url="https://github.com/openshift/prometheus-operator/commit/b4525534c11bb0a4f201b3a596a91f0cf0e51171" \
        version="v4.5.0"

