-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDockerfile
55 lines (44 loc) · 1.72 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
FROM quay.io/centos/centos:stream9-minimal
ARG UID=101
ARG PORT=3000
WORKDIR /usr/share/grafana
ENV VERSION=10
ENV GF_PATHS_HOME=/usr/share/grafana
ENV HOME=/usr/share/grafana
ENV GF_PATHS_PROVISIONING=/etc/grafana/provisioning
ENV GF_PATHS_DATA=/var/lib/grafana
ENV GF_PATHS_LOGS=/var/log/grafana
ENV GF_PATHS_PLUGINS=/var/lib/grafana/plugins
ENV GF_PATHS_CONFIG=/etc/grafana/grafana.ini
LABEL name="cryostat/cryostat-grafana-dashboard" \
version="${VERSION}" \
usage="podman run -d --name grafana -p ${PORT}:${PORT} -v grafana-data:${GF_PATHS_DATA} quay.io/cryostat/cryostat-grafana-dashboard" \
maintainer="Cryostat Maintainers <cryostat-development@googlegroups.com>" \
io.k8s.display-name="Grafana" \
io.openshift.expose-services="3000:grafana" \
io.openshift.tags="grafana,monitoring,dashboard"
RUN useradd -u ${UID} -g 0 -r -d $GF_PATHS_HOME -s /sbin/nologin grafana && \
microdnf upgrade -y && \
microdnf install -y --setopt=tsflags=nodocs grafana && \
microdnf clean all && \
chgrp -R 0 /etc/grafana /var/lib/grafana /var/log/grafana && \
chmod -R g=u /var/lib/grafana /var/log/grafana && \
/usr/sbin/grafana cli plugins install yesoreyeram-infinity-datasource
COPY --chown=grafana:grafana \
dashboards.yaml \
dashboards/*.dashboard.json \
${GF_PATHS_PROVISIONING}/dashboards/
COPY --chown=grafana:grafana \
datasource.yaml \
${GF_PATHS_PROVISIONING}/datasources/
COPY --chown=grafana:grafana \
grafana.ini \
${GF_PATHS_CONFIG}
COPY --chown=grafana:grafana \
entrypoint.bash \
/usr/bin/run-grafana
# Listen address of jfr-datasource
ENV JFR_DATASOURCE_URL "http://0.0.0.0:8080"
USER ${UID}
EXPOSE ${PORT}
ENTRYPOINT [ "/usr/bin/run-grafana" ]