mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Plugins: Support installing to folders with whitespace and fix pluginUrl trailing and leading whitespace failures (#32506)
* Plugins: Support installing to folders with whitespace and fix pluginUrl trailing and leading whitespace failures * update docs * update docs
This commit is contained in:
parent
e6f9f65fdf
commit
6958340b24
@ -81,13 +81,13 @@ docker run -d \
|
||||
|
||||
> Only available in Grafana v5.3.1 and later.
|
||||
|
||||
You can install plugins from custom URLs by specifying the URL like this: `GF_INSTALL_PLUGINS=<url to plugin zip>;<plugin name>`.
|
||||
You can install a plugin from a custom URL by specifying the URL like this: `GF_INSTALL_PLUGINS=<url to plugin zip>;<plugin install folder name>`.
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
-p 3000:3000 \
|
||||
--name=grafana \
|
||||
-e "GF_INSTALL_PLUGINS=http://plugin-domain.com/my-custom-plugin.zip;custom-plugin" \
|
||||
-e "GF_INSTALL_PLUGINS=http://plugin-domain.com/my-custom-plugin.zip;custom-plugin,grafana-clock-panel" \
|
||||
grafana/grafana
|
||||
```
|
||||
|
||||
@ -114,7 +114,7 @@ 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>`.
|
||||
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 install folder name>`.
|
||||
|
||||
```bash
|
||||
cd packaging/docker/custom
|
||||
|
@ -42,8 +42,8 @@ RUN if [ ! -z "${GF_INSTALL_PLUGINS}" ]; then \
|
||||
IFS=$OLDIFS; \
|
||||
if expr match "$plugin" '.*\;.*'; then \
|
||||
pluginUrl=$(echo "$plugin" | cut -d';' -f 1); \
|
||||
pluginWithoutUrl=$(echo "$plugin" | cut -d';' -f 2); \
|
||||
grafana-cli --pluginUrl "${pluginUrl}" --pluginsDir "${GF_PATHS_PLUGINS}" plugins install ${pluginWithoutUrl}; \
|
||||
pluginInstallFolder=$(echo "$plugin" | cut -d';' -f 2); \
|
||||
grafana-cli --pluginUrl ${pluginUrl} --pluginsDir "${GF_PATHS_PLUGINS}" plugins install "${pluginInstallFolder}"; \
|
||||
else \
|
||||
grafana-cli --pluginsDir "${GF_PATHS_PLUGINS}" plugins install ${plugin}; \
|
||||
fi \
|
||||
|
@ -46,8 +46,8 @@ RUN if [ ! -z "${GF_INSTALL_PLUGINS}" ]; then \
|
||||
IFS=$OLDIFS; \
|
||||
if expr match "$plugin" '.*\;.*'; then \
|
||||
pluginUrl=$(echo "$plugin" | cut -d';' -f 1); \
|
||||
pluginWithoutUrl=$(echo "$plugin" | cut -d';' -f 2); \
|
||||
grafana-cli --pluginUrl "${pluginUrl}" --pluginsDir "${GF_PATHS_PLUGINS}" plugins install ${pluginWithoutUrl}; \
|
||||
pluginInstallFolder=$(echo "$plugin" | cut -d';' -f 2); \
|
||||
grafana-cli --pluginUrl ${pluginUrl} --pluginsDir "${GF_PATHS_PLUGINS}" plugins install "${pluginInstallFolder}"; \
|
||||
else \
|
||||
grafana-cli --pluginsDir "${GF_PATHS_PLUGINS}" plugins install ${plugin}; \
|
||||
fi \
|
||||
|
@ -69,8 +69,8 @@ if [ ! -z "${GF_INSTALL_PLUGINS}" ]; then
|
||||
IFS=$OLDIFS
|
||||
if [[ $plugin =~ .*\;.* ]]; then
|
||||
pluginUrl=$(echo "$plugin" | cut -d';' -f 1)
|
||||
pluginWithoutUrl=$(echo "$plugin" | cut -d';' -f 2)
|
||||
grafana-cli --pluginUrl "${pluginUrl}" --pluginsDir "${GF_PATHS_PLUGINS}" plugins install ${pluginWithoutUrl}
|
||||
pluginInstallFolder=$(echo "$plugin" | cut -d';' -f 2)
|
||||
grafana-cli --pluginUrl ${pluginUrl} --pluginsDir "${GF_PATHS_PLUGINS}" plugins install "${pluginInstallFolder}"
|
||||
else
|
||||
grafana-cli --pluginsDir "${GF_PATHS_PLUGINS}" plugins install ${plugin}
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user