#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"
ENV GOBIN="${GOPATH}/bin"
ENV PATH="${GOBIN}:${PATH}"
RUN mkdir -p $GOBIN

COPY . $GOPATH/src/github.com/grafana/grafana

RUN yum install -y golang make git && \
    cd $GOPATH/src/github.com/grafana/grafana && \
    go run build.go build && \
    yum erase -y golang make git && yum clean all && \
    rm -rf .git


# doesn't require a root user.
USER 1001

WORKDIR $GOPATH/src/github.com/grafana/grafana
ENTRYPOINT ["/go/src/github.com/grafana/grafana/bin/linux-amd64/grafana-server"]

LABEL \
        io.k8s.description="Grafana is an open source, feature rich metrics dashboard and graph editor for Graphite, Elasticsearch, OpenTSDB, Prometheus and InfluxDB." \
        com.redhat.component="grafana-container" \
        maintainer="Frederic Branczyk <fbranczy@redhat.com>" \
        name="openshift3/grafana" \
        License="GPLv2+" \
        io.k8s.display-name="Grafana" \
        version="v3.11.16" \
        vendor="Red Hat" \
        io.openshift.tags="openshift"

