Docker: Support pre-installing plugins from other sources in custom Dockerfiles (#31234)

Update custom Dockerfiles to support pre-installing plugins from other sources.

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
This commit is contained in:
Pureewat Kaewpoi
2021-03-11 18:17:34 +07:00
committed by GitHub
parent 9f92eb6859
commit 05d6d32f3e
3 changed files with 32 additions and 7 deletions

View File

@@ -112,6 +112,20 @@ docker build \
docker run -d -p 3000:3000 --name=grafana grafana-custom
```
### Build with pre-installed plugins from other sources
You can build a Docker image with plugins from other sources by specifying the URL like this: `GF_INSTALL_PLUGINS=<url to plugin zip>;<plugin name>`.
```bash
cd packaging/docker/custom
docker build \
--build-arg "GRAFANA_VERSION=latest" \
--build-arg "GF_INSTALL_PLUGINS=http://plugin-domain.com/my-custom-plugin.zip;custom-plugin,grafana-clock-panel" \
-t grafana-custom -f Dockerfile .
docker run -d -p 3000:3000 --name=grafana grafana-custom
```
Replace `Dockerfile` in above example with `ubuntu.Dockerfile` to build a custom Ubuntu based image (Grafana v6.5+).
### Build with Grafana Image Renderer plugin pre-installed
@@ -227,4 +241,3 @@ Refer to [Configure a Grafana Docker image]({{< relref "../administration/config
Refer to the [Configuration]({{< relref "../administration/configuration.md" >}}) page for details on options for customizing your environment, logging, database, and so on.