# Dockerfile used by OSBS and by prow CI.
FROM openshift/golang-builder:1.12 AS builder
ENV SOURCE_GIT_COMMIT=38109e45e3a6de5243de6ec45067402b67726c95 SOURCE_DATE_EPOCH=1568365049 BUILD_VERSION=v4.2.14 SOURCE_GIT_URL=https://github.com/openshift/prometheus-operator SOURCE_GIT_TAG=38109e45 BUILD_RELEASE=202001061701
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.2.14.20200106.170123
ENV SOURCE_GIT_COMMIT=38109e45e3a6de5243de6ec45067402b67726c95 SOURCE_DATE_EPOCH=1568365049 BUILD_VERSION=v4.2.14 SOURCE_GIT_URL=https://github.com/openshift/prometheus-operator SOURCE_GIT_TAG=38109e45 BUILD_RELEASE=202001061701
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.description="This component manages the lifecycle and configuration of a Prometheus monitoring server as well as Prometheus Alertmanager clusters." \
        com.redhat.component="prometheus-operator-container" \
        maintainer="Frederic Branczyk <fbranczy@redhat.com>" \
        name="openshift/ose-prometheus-operator" \
        License="ASL 2.0" \
        io.k8s.display-name="Prometheus Operator" \
        io.openshift.build.source-location="https://github.com/openshift/prometheus-operator" \
        io.openshift.build.commit.url="https://github.com/openshift/prometheus-operator/commit/38109e45e3a6de5243de6ec45067402b67726c95" \
        version="v4.2.14" \
        io.openshift.build.commit.id="38109e45e3a6de5243de6ec45067402b67726c95" \
        release="202001061701" \
        vendor="Red Hat" \
        io.openshift.tags="prometheus"

