FROM openshift3/ose-base:v3.11.135.20190802.115523
ENV BUILD_VERSION=v3.11.135
ENV SOURCE_GIT_COMMIT=bb85bd3e19b1fb6d7e33babe380ae0fbd3352a6c SOURCE_DATE_EPOCH=1544287836 BUILD_VERSION=v3.11.135 SOURCE_GIT_URL=https://github.com/openshift/configmap-reload SOURCE_GIT_TAG=v0.2.2-15-gbb85bd3 BUILD_RELEASE=1

ENV GOPATH /go
RUN mkdir -p $GOPATH/bin

COPY . $GOPATH/src/github.com/jimmidyson/configmap-reload

RUN yum install -y golang make git && \
   cd $GOPATH/src/github.com/jimmidyson/configmap-reload && \
   PATH=$PATH:$GOPATH/bin make out/configmap-reload GOPATH=$GOPATH && cp $GOPATH/src/github.com/jimmidyson/configmap-reload/out/configmap-reload /usr/bin/configmap-reload && \
   yum autoremove -y golang make git && yum clean all


# doesn't require a root user.
USER 1001

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

LABEL \
        io.k8s.description="This is a component reloads another process if a configured configmap volume is remounted." \
        com.redhat.component="configmap-reload-container" \
        maintainer="Frederic Branczyk <fbranczy@redhat.com>" \
        name="openshift3/ose-configmap-reloader" \
        License="ASL 2.0" \
        io.k8s.display-name="configmap reload" \
        io.openshift.build.source-location="https://github.com/openshift/configmap-reload" \
        io.openshift.build.commit.url="https://github.com/openshift/configmap-reload/commit/bb85bd3e19b1fb6d7e33babe380ae0fbd3352a6c" \
        version="v3.11.135" \
        io.openshift.build.commit.id="bb85bd3e19b1fb6d7e33babe380ae0fbd3352a6c" \
        vendor="Red Hat" \
        io.openshift.tags="kubernetes"

