-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (30 loc) · 1.03 KB
/
Dockerfile
File metadata and controls
40 lines (30 loc) · 1.03 KB
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
# Use the official Grafana image
FROM grafana/grafana:latest
# Install Python
USER root
RUN echo "Installing Python..." \
&& apk add --no-cache python3 py3-pip \
&& echo "Python installed successfully."
# set timeout for plugin installation
ENV GF_INSTALL_PLUGINS_TIMEOUT=6000
ENV GF_UPDATE_CHECK=false
# Install Grafana plugins
RUN echo "Installing plugins..." \
&& grafana-cli plugins install grafana-lokiexplore-app \
&& grafana-cli plugins install grafana-pyroscope-app
# Copy custom grafana.ini configuration file
COPY ./grafana.ini /etc/grafana/grafana.ini
# Copy provisioning and dashboards
RUN echo "=========\n\n\n\Copying provisioning files..."
COPY ./provisioning /etc/grafana/provisioning
RUN echo "Provisioning files copied."
RUN echo "Copying dashboard files..."
COPY ./dashboards /var/lib/grafana/dashboards
RUN echo "Dashboard files copied."
COPY run.sh /run.sh
RUN chmod +x /run.sh
# Expose Grafana port
EXPOSE 3000
# Switch to the non-root user provided by the base image
USER grafana
ENTRYPOINT ["/run.sh"]