Docker: change plugin path in custom docker (#21837)

This is to make the custom dockerfiles compatible with our instruction
to use persitent volumes for the /var/lib/grafana dir. Without this
change the contents of that folder will be overshadowed by the persitent
volume and none of the pre-installed plugins will be available.
This commit is contained in:
Leonard Gram 2020-01-30 20:17:41 +01:00 committed by GitHub
parent 6e80315531
commit 5345868148
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View File

@ -6,6 +6,11 @@ USER root
ARG GF_INSTALL_IMAGE_RENDERER_PLUGIN="false"
ENV GF_PATHS_PLUGINS="/var/lib/grafana-plugins"
RUN mkdir -p "$GF_PATHS_PLUGINS" && \
chown -R grafana:grafana "$GF_PATHS_PLUGINS"
RUN if [ $GF_INSTALL_IMAGE_RENDERER_PLUGIN = "true" ]; then \
echo "http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \
echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories && \

View File

@ -1,4 +1,4 @@
ARG GRAFANA_VERSION="latest-ubuntu"
ARG GRAFANA_VERSION="latest"
FROM grafana/grafana:${GRAFANA_VERSION}-ubuntu
@ -9,6 +9,11 @@ ARG DEBIAN_FRONTEND=noninteractive
ARG GF_INSTALL_IMAGE_RENDERER_PLUGIN="false"
ENV GF_PATHS_PLUGINS="/var/lib/grafana-plugins"
RUN mkdir -p "$GF_PATHS_PLUGINS" && \
chown -R grafana:grafana "$GF_PATHS_PLUGINS"
RUN if [ $GF_INSTALL_IMAGE_RENDERER_PLUGIN = "true" ]; then \
apt-get update && \
apt-get upgrade -y && \