Docker: Custom dockerfiles, docker and image rendering docs update (#20492)
Adds support for using custom dockerfiles to pre-install image renderer plugins. Updates docs for docker and image rendering. Fixes #20241 Co-Authored-By: Leonard Gram <leo@xlson.com>
This commit is contained in:
co-authored by
Leonard Gram
parent
caff9146ea
commit
2484b24c75
@@ -2,8 +2,31 @@ ARG GRAFANA_VERSION="latest"
|
||||
|
||||
FROM grafana/grafana:${GRAFANA_VERSION}
|
||||
|
||||
USER root
|
||||
|
||||
ARG GF_INSTALL_IMAGE_RENDERER_PLUGIN="false"
|
||||
|
||||
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 && \
|
||||
echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories && \
|
||||
apk --no-cache upgrade && \
|
||||
apk add --no-cache udev ttf-opensans chromium && \
|
||||
rm -rf /tmp/* && \
|
||||
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 \
|
||||
|
||||
Reference in New Issue
Block a user