# Dockerfile used by OSBS and by prow CI.
FROM openshift/golang-builder:1.13 AS builder
ENV __doozer=update BUILD_RELEASE=202007291438.p0 BUILD_VERSION=v4.4.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=4 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.4.0-202007291438.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=ad8c9da OS_GIT_VERSION=4.4.0-202007291438.p0-ad8c9da SOURCE_DATE_EPOCH=1592577553 SOURCE_GIT_COMMIT=ad8c9daeaa6c6763f3af18e0c01cc6207680285e SOURCE_GIT_TAG=v0.20.0-1538-gad8c9dae 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 prometheus-config-reloader

FROM openshift/ose-base:v4.4.0.20200729.144748
ENV __doozer=update BUILD_RELEASE=202007291438.p0 BUILD_VERSION=v4.4.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=4 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.4.0-202007291438.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=ad8c9da OS_GIT_VERSION=4.4.0-202007291438.p0-ad8c9da SOURCE_DATE_EPOCH=1592577553 SOURCE_GIT_COMMIT=ad8c9daeaa6c6763f3af18e0c01cc6207680285e SOURCE_GIT_TAG=v0.20.0-1538-gad8c9dae SOURCE_GIT_URL=https://github.com/openshift/prometheus-operator 
COPY --from=builder /go/src/github.com/coreos/prometheus-operator/prometheus-config-reloader /usr/bin/
# doesn't require a root user.
USER 1001
ENTRYPOINT ["/usr/bin/prometheus-config-reloader"]

LABEL \
        io.k8s.display-name="Prometheus config reloader" \
        io.k8s.description="This component reloads a Prometheus server in a controlled and configurable way." \
        io.openshift.tags="prometheus" \
        maintainer="Frederic Branczyk <fbranczy@redhat.com>" \
        License="ASL 2.0" \
        vendor="Red Hat" \
        name="openshift/ose-prometheus-config-reloader" \
        com.redhat.component="prometheus-config-reloader-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Monitoring" \
        release="202007291438.p0" \
        io.openshift.build.commit.id="ad8c9daeaa6c6763f3af18e0c01cc6207680285e" \
        io.openshift.build.source-location="https://github.com/openshift/prometheus-operator" \
        io.openshift.build.commit.url="https://github.com/openshift/prometheus-operator/commit/ad8c9daeaa6c6763f3af18e0c01cc6207680285e" \
        version="v4.4.0"

