# Dockerfile used by OSBS and by prow CI.
FROM openshift/golang-builder@sha256:2c34135dc4d4a35fa19775e4e559e2e6f2e476a0ccdc993360e3663729904035 AS builder
ENV __doozer=update BUILD_RELEASE=202201210133.p0.g8f4efab.assembly.stream BUILD_VERSION=v4.8.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=8 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.8.0-202201210133.p0.g8f4efab.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=8f4efab OS_GIT_VERSION=4.8.0-202201210133.p0.g8f4efab.assembly.stream-8f4efab SOURCE_DATE_EPOCH=1628709357 SOURCE_GIT_COMMIT=8f4efab9e7fa34f79a5900d95113f62908889168 SOURCE_GIT_TAG=v0.20.0-2640-g8f4efab9e 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.8.0-202112141153.p0.gad38e11.assembly.stream
ENV __doozer=update BUILD_RELEASE=202201210133.p0.g8f4efab.assembly.stream BUILD_VERSION=v4.8.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=8 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.8.0-202201210133.p0.g8f4efab.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=8f4efab OS_GIT_VERSION=4.8.0-202201210133.p0.g8f4efab.assembly.stream-8f4efab SOURCE_DATE_EPOCH=1628709357 SOURCE_GIT_COMMIT=8f4efab9e7fa34f79a5900d95113f62908889168 SOURCE_GIT_TAG=v0.20.0-2640-g8f4efab9e 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="202201210133.p0.g8f4efab.assembly.stream" \
        io.openshift.build.commit.id="8f4efab9e7fa34f79a5900d95113f62908889168" \
        io.openshift.build.source-location="https://github.com/openshift/prometheus-operator" \
        io.openshift.build.commit.url="https://github.com/openshift/prometheus-operator/commit/8f4efab9e7fa34f79a5900d95113f62908889168" \
        version="v4.8.0"

