-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build(container): rebase to centos9-stream (#78)
- Loading branch information
1 parent
e0fce3e
commit bbdba5e
Showing
2 changed files
with
59 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,55 @@ | ||
FROM docker.io/grafana/grafana:10.4.3 | ||
|
||
EXPOSE 3000 | ||
|
||
RUN grafana cli plugins install yesoreyeram-infinity-datasource | ||
|
||
COPY --chown=grafana:root \ | ||
dashboards.yaml \ | ||
dashboards/*.dashboard.json \ | ||
/etc/grafana/provisioning/dashboards/ | ||
|
||
COPY --chown=grafana:root \ | ||
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 <[email protected]>" \ | ||
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 \ | ||
/etc/grafana/provisioning/datasources/ | ||
${GF_PATHS_PROVISIONING}/datasources/ | ||
|
||
COPY --chown=grafana:root \ | ||
COPY --chown=grafana:grafana \ | ||
grafana.ini \ | ||
/etc/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 grafana | ||
USER 472 | ||
USER ${UID} | ||
|
||
EXPOSE ${PORT} | ||
|
||
ENTRYPOINT [ "/run.sh" ] | ||
ENTRYPOINT [ "/usr/bin/run-grafana" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
exec /usr/sbin/grafana-server \ | ||
--homepath="$GF_PATHS_HOME" \ | ||
--config="$GF_PATHS_CONFIG" \ | ||
--packaging=docker \ | ||
"$@" \ | ||
cfg:default.log.mode="console" \ | ||
cfg:default.paths.data="$GF_PATHS_DATA" \ | ||
cfg:default.paths.logs="$GF_PATHS_LOGS" \ | ||
cfg:default.paths.plugins="$GF_PATHS_PLUGINS" \ | ||
cfg:default.paths.provisioning="$GF_PATHS_PROVISIONING" |