nandi/atop-analyzepublic Fork 0
9a2f9a8
Commits
Clone
git clone https://git.rickub.com/nandi/atop-analyze.git
git clone ssh://git@rickub.com/nandi/atop-analyze.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Build Grafana image from Dockerfile

nandithebull committed 2026-09-21T19:58:29-07:00 Browse files
9a2f9a8 parent: de739e7
added grafana/Dockerfile +16 -0
new file mode 100644
@@ -0,0 +1,16 @@
1+FROM grafana/grafana:11.6.0
2+
3+# Modal functions need Python to invoke the function wrapper. Build as root so
4+# Python and the Grafana plugin can be installed, then run Grafana unprivileged.
5+USER root
6+RUN if [ -f /etc/alpine-release ]; then \
7+ apk add --no-cache python3; \
8+ else \
9+ apt-get update && apt-get install --no-install-recommends -y python3 && rm -rf /var/lib/apt/lists/*; \
10+ fi \
11+ && ln -sf "$(command -v python3)" /usr/local/bin/python \
12+ && grafana cli plugins install grafana-clickhouse-datasource \
13+ && chown -R 472:0 /var/lib/grafana/plugins
14+
15+# The upstream Alpine image runs Grafana as its unprivileged numeric UID.
16+USER 472
new file mode 100644
@@ -0,0 +1,16 @@
1+FROM grafana/grafana:11.6.0
2+
3+# Modal functions need Python to invoke the function wrapper. Build as root so
4+# Python and the Grafana plugin can be installed, then run Grafana unprivileged.
5+USER root
6+RUN if [ -f /etc/alpine-release ]; then \
7+ apk add --no-cache python3; \
8+ else \
9+ apt-get update && apt-get install --no-install-recommends -y python3 && rm -rf /var/lib/apt/lists/*; \
10+ fi \
11+ && ln -sf "$(command -v python3)" /usr/local/bin/python \
12+ && grafana cli plugins install grafana-clickhouse-datasource \
13+ && chown -R 472:0 /var/lib/grafana/plugins
14+
15+# The upstream Alpine image runs Grafana as its unprivileged numeric UID.
16+USER 472
modified modal_grafana.py +1 -2
@@ -25,8 +25,7 @@ grafana_secret = modal.Secret.from_name(
2525 ],
2626 )
2727 image = (
28- modal.Image.from_registry("grafana/grafana:11.6.0", add_python="3.12")
29- .run_commands("grafana cli plugins install grafana-clickhouse-datasource")
28+ modal.Image.from_dockerfile("grafana/Dockerfile")
3029 .add_local_dir("grafana/provisioning", "/etc/grafana/provisioning")
3130 )
3231
@@ -25,8 +25,7 @@ grafana_secret = modal.Secret.from_name(
25 ],25 ],
26 )26 )
27 image = (27 image = (
28- modal.Image.from_registry("grafana/grafana:11.6.0", add_python="3.12")28+ modal.Image.from_dockerfile("grafana/Dockerfile")
29- .run_commands("grafana cli plugins install grafana-clickhouse-datasource")
30 .add_local_dir("grafana/provisioning", "/etc/grafana/provisioning")29 .add_local_dir("grafana/provisioning", "/etc/grafana/provisioning")
31 )30 )
32 31