# Dockerfile used by OSBS and by prow CI.
FROM openshift/golang-builder:rhel_8_golang_1.15 AS builder
ENV __doozer=update BUILD_RELEASE=202109030220.p0.git.555d602.assembly.stream BUILD_VERSION=v4.6.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=6 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.6.0-202109030220.p0.git.555d602.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=555d602 OS_GIT_VERSION=4.6.0-202109030220.p0.git.555d602.assembly.stream-555d602 SOURCE_DATE_EPOCH=1615413293 SOURCE_GIT_COMMIT=555d6020fa7e3cfd8237daa9802e2bd9cd72ba63 SOURCE_GIT_TAG=v0.20.0-2112-g555d6020f 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.6.0.20210903.023232
ENV __doozer=update BUILD_RELEASE=202109030220.p0.git.555d602.assembly.stream BUILD_VERSION=v4.6.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=6 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.6.0-202109030220.p0.git.555d602.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=555d602 OS_GIT_VERSION=4.6.0-202109030220.p0.git.555d602.assembly.stream-555d602 SOURCE_DATE_EPOCH=1615413293 SOURCE_GIT_COMMIT=555d6020fa7e3cfd8237daa9802e2bd9cd72ba63 SOURCE_GIT_TAG=v0.20.0-2112-g555d6020f 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" \
        summary="This component manages the lifecycle and configuration of a Prometheus monitoring server as well as Prometheus Alertmanager clusters." \
        maintainer="OpenShift Monitoring Team <team-monitoring@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="202109030220.p0.git.555d602.assembly.stream" \
        io.openshift.build.commit.id="555d6020fa7e3cfd8237daa9802e2bd9cd72ba63" \
        io.openshift.build.source-location="https://github.com/openshift/prometheus-operator" \
        io.openshift.build.commit.url="https://github.com/openshift/prometheus-operator/commit/555d6020fa7e3cfd8237daa9802e2bd9cd72ba63" \
        version="v4.6.0"

