#oit## This file is managed by the OpenShift Image Tool: https://github.com/openshift/enterprise-images
#oit## by the OpenShift Continuous Delivery team (#aos-cd-team on IRC).
#oit## 
#oit## Any yum repos listed in this file will effectively be ignored during CD builds.
#oit## Yum repos must be enabled in the oit configuration files.
#oit## The content of this file is managed from an external source.
#oit## Changes made directly in distgit will be lost during the next
#oit## reconciliation process.
#oit## 
FROM openshift3/ose-base:v3.11.16.20180926.221407

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-linux-amd64 GOPATH=$GOPATH && cp $GOPATH/src/github.com/jimmidyson/configmap-reload/out/configmap-reload-linux-amd64 /usr/bin/configmap-reload && \
   yum erase -y golang make && 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="GPLv2+" \
        io.k8s.display-name="configmap reload" \
        version="v3.11.16" \
        vendor="Red Hat" \
        io.openshift.tags="kubernetes"

