# Dockerfile used by OSBS and by prow CI.
FROM openshift/golang-builder:rhel_8_golang_1.15 AS builder
ENV __doozer=update BUILD_RELEASE=202103202154.p0 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-202103202154.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=2ac2b63 OS_GIT_VERSION=4.6.0-202103202154.p0-2ac2b63 SOURCE_DATE_EPOCH=1610963586 SOURCE_GIT_COMMIT=2ac2b6353aa536ddbb5785509a182baea7829b57 SOURCE_GIT_TAG=v0.2.2-50-g2ac2b63 SOURCE_GIT_URL=https://github.com/openshift/configmap-reload 
WORKDIR /go/src/github.com/jimmidyson/configmap-reload
COPY . .
ENV GOFLAGS="-mod=vendor"
RUN make out/configmap-reload

FROM openshift/ose-base:v4.6.0.20210320.224255
ENV __doozer=update BUILD_RELEASE=202103202154.p0 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-202103202154.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=2ac2b63 OS_GIT_VERSION=4.6.0-202103202154.p0-2ac2b63 SOURCE_DATE_EPOCH=1610963586 SOURCE_GIT_COMMIT=2ac2b6353aa536ddbb5785509a182baea7829b57 SOURCE_GIT_TAG=v0.2.2-50-g2ac2b63 SOURCE_GIT_URL=https://github.com/openshift/configmap-reload 

ARG FROM_DIRECTORY=/go/src/github.com/jimmidyson/configmap-reload
COPY --from=builder ${FROM_DIRECTORY}/out/configmap-reload  /usr/bin/configmap-reload

USER nobody

ENTRYPOINT ["/usr/bin/configmap-reload"]

LABEL \
        io.k8s.display-name="configmap reload" \
        io.k8s.description="This is a component reloads another process if a configured configmap volume is remounted." \
        io.openshift.tags="kubernetes" \
        summary="This is a component reloads another process if a configured configmap volume is remounted." \
        maintainer="OpenShift Monitoring Team <team-monitoring@redhat.com>" \
        License="ASL 2.0" \
        vendor="Red Hat" \
        name="openshift/ose-configmap-reloader" \
        com.redhat.component="configmap-reload-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Monitoring" \
        release="202103202154.p0" \
        io.openshift.build.commit.id="2ac2b6353aa536ddbb5785509a182baea7829b57" \
        io.openshift.build.source-location="https://github.com/openshift/configmap-reload" \
        io.openshift.build.commit.url="https://github.com/openshift/configmap-reload/commit/2ac2b6353aa536ddbb5785509a182baea7829b57" \
        version="v4.6.0"

