mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
42 lines
1.2 KiB
Docker
42 lines
1.2 KiB
Docker
|
ARG GRAFANA_VERSION="latest-ubuntu"
|
||
|
|
||
|
FROM grafana/grafana:${GRAFANA_VERSION}-ubuntu
|
||
|
|
||
|
USER root
|
||
|
|
||
|
# Set DEBIAN_FRONTEND=noninteractive in environment at build-time
|
||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||
|
|
||
|
ARG GF_INSTALL_IMAGE_RENDERER_PLUGIN="false"
|
||
|
|
||
|
RUN if [ $GF_INSTALL_IMAGE_RENDERER_PLUGIN = "true" ]; then \
|
||
|
apt-get update && \
|
||
|
apt-get upgrade -y && \
|
||
|
apt-get install -y chromium-browser && \
|
||
|
apt-get autoremove -y && \
|
||
|
rm -rf /var/lib/apt/lists/* && \
|
||
|
rm -rf /usr/share/grafana/tools/phantomjs; \
|
||
|
fi
|
||
|
|
||
|
USER grafana
|
||
|
|
||
|
ENV GF_RENDERER_PLUGIN_CHROME_BIN="/usr/bin/chromium-browser"
|
||
|
|
||
|
RUN if [ $GF_INSTALL_IMAGE_RENDERER_PLUGIN = "true" ]; then \
|
||
|
grafana-cli \
|
||
|
--pluginsDir "$GF_PATHS_PLUGINS" \
|
||
|
--pluginUrl https://github.com/grafana/grafana-image-renderer/releases/latest/download/plugin-linux-x64-glibc-no-chromium.zip \
|
||
|
plugins install grafana-image-renderer; \
|
||
|
fi
|
||
|
|
||
|
ARG GF_INSTALL_PLUGINS=""
|
||
|
|
||
|
RUN if [ ! -z "${GF_INSTALL_PLUGINS}" ]; then \
|
||
|
OLDIFS=$IFS; \
|
||
|
IFS=','; \
|
||
|
for plugin in ${GF_INSTALL_PLUGINS}; do \
|
||
|
IFS=$OLDIFS; \
|
||
|
grafana-cli --pluginsDir "$GF_PATHS_PLUGINS" plugins install ${plugin}; \
|
||
|
done; \
|
||
|
fi
|