6.7.4-debian-10-r1 release

This commit is contained in:
Bitnami Bot 2020-06-05 08:59:34 +00:00
parent 4ba5fbe1ec
commit ab1368c72d
6 changed files with 174 additions and 38 deletions

View File

@ -0,0 +1,25 @@
FROM docker.io/bitnami/minideb:buster
LABEL maintainer "Bitnami <containers@bitnami.com>"
# Install required system packages and dependencies
RUN install_packages ca-certificates curl libc6 libfontconfig libgcc1 libstdc++6 procps sudo unzip wget zlib1g
RUN wget -nc -P /tmp/bitnami/pkg/cache/ https://downloads.bitnami.com/files/stacksmith/grafana-6.7.4-0-linux-amd64-debian-10.tar.gz && \
echo "ae41fffb92c8c701cfbe6d99f74a01fe9a5aa1705dec9a376f064f55c12279ca /tmp/bitnami/pkg/cache/grafana-6.7.4-0-linux-amd64-debian-10.tar.gz" | sha256sum -c - && \
tar -zxf /tmp/bitnami/pkg/cache/grafana-6.7.4-0-linux-amd64-debian-10.tar.gz -P --transform 's|^[^/]*/files|/opt/bitnami|' --wildcards '*/files' && \
rm -rf /tmp/bitnami/pkg/cache/grafana-6.7.4-0-linux-amd64-debian-10.tar.gz
RUN apt-get update && apt-get upgrade -y && \
rm -r /var/lib/apt/lists /var/cache/apt/archives
RUN mv /opt/bitnami/grafana/conf/sample.ini /opt/bitnami/grafana/conf/grafana.ini
RUN mkdir -p /opt/bitnami/grafana/data/ /opt/bitnami/grafana/logs/ && chmod g+rwX /opt/bitnami/grafana/data/ /opt/bitnami/grafana/logs/
COPY rootfs /
RUN /grafana-plugins.sh
ENV BITNAMI_APP_NAME="grafana" \
BITNAMI_IMAGE_VERSION="6.7.4-debian-10-r1" \
PATH="/opt/bitnami/grafana/bin:$PATH"
EXPOSE 3000
WORKDIR /opt/bitnami/grafana
USER 1001
ENTRYPOINT [ "/run.sh" ]

View File

@ -0,0 +1,14 @@
version: '2'
services:
grafana:
image: bitnami/grafana:7
ports:
- '3000:3000'
environment:
- 'GF_SECURITY_ADMIN_PASSWORD=bitnami'
volumes:
- grafana_data:/opt/bitnami/grafana/data
volumes:
grafana_data:
driver: local

View File

@ -0,0 +1,55 @@
#!/bin/bash
grafana_install_plugin_command="/opt/bitnami/grafana/bin/grafana-cli"
grafana_install_plugin_args=("--pluginsDir" "/opt/bitnami/grafana/data/plugins" "plugins" "install")
grafana_plugin_list=(
"grafana-clock-panel"
"grafana-piechart-panel"
"michaeldmoore-annunciator-panel"
"digiapulssi-breadcrumb-panel"
"briangann-gauge-panel"
"briangann-datatable-panel"
"jdbranham-diagram-panel"
"natel-discrete-panel"
"savantly-heatmap-panel"
"mtanda-histogram-panel"
"digiapulssi-organisations-panel"
"natel-plotly-panel"
"bessler-pictureit-panel"
"vonage-status-panel"
"btplc-status-dot-panel"
"btplc-peak-report-panel"
"grafana-worldmap-panel"
"satellogic-3d-globe-panel"
"digiapulssi-breadcrumb-panel"
"btplc-trend-box-panel"
"neocat-cal-heatmap-panel"
"mtanda-histogram-panel"
"digrich-bubblechart-panel"
"digiapulssi-breadcrumb-panel"
"agenty-flowcharting-panel"
"larona-epict-panel"
"pierosavi-imageit-panel"
"michaeldmoore-multistat-panel"
"grafana-polystat-panel"
"snuids-radar-panel"
"scadavis-synoptic-panel"
"gretamosa-topology-panel"
"marcuscalidus-svg-panel"
"fatcloud-windrose-panel"
"snuids-trafficlights-panel"
)
for plugin in "${grafana_plugin_list[@]}"; do
echo Installing "$plugin"
"${grafana_install_plugin_command[@]}" "${grafana_install_plugin_args[@]}" "${plugin}"
done
chmod g+rwX /opt/bitnami/grafana/data/plugins
# The Grafana Helm chart mounts the data directory at "/opt/bitnami/grafana/data"
# Therefore, all the plugins installed when building the image will be lost
# As a workaround, we can move them to a "default-plugins" directory and recover them
# during the 1st boot of the container
mkdir -p /opt/bitnami/grafana/default-plugins
mv /opt/bitnami/grafana/data/plugins/* /opt/bitnami/grafana/default-plugins/

View File

@ -0,0 +1,49 @@
#!/bin/bash -e
: "${GF_PATHS_CONFIG:=/opt/bitnami/grafana/conf/grafana.ini}"
: "${GF_PATHS_DATA:=/opt/bitnami/grafana/data}"
: "${GF_PATHS_LOGS:=/opt/bitnami/grafana/logs}"
: "${GF_PATHS_PLUGINS:=/opt/bitnami/grafana/data/plugins}"
: "${GF_PATHS_DEFAULT_PLUGINS:=/opt/bitnami/grafana/default-plugins}"
: "${GF_PATHS_PROVISIONING:=/opt/bitnami/grafana/conf/provisioning}"
# Recover plugins installed when building the image
if [[ ! -e "$GF_PATHS_PLUGINS" ]] || [[ -z "$(ls -A "$GF_PATHS_PLUGINS")" ]]; then
mkdir -p "$GF_PATHS_PLUGINS"
if [[ -e "$GF_PATHS_DEFAULT_PLUGINS" ]] && [[ -n "$(ls -A "$GF_PATHS_DEFAULT_PLUGINS")" ]]; then
cp -r "$GF_PATHS_DEFAULT_PLUGINS"/* "$GF_PATHS_PLUGINS"
fi
fi
if [[ -n "$GF_INSTALL_PLUGINS" ]]; then
splitted_plugin_list=$(tr ',;' ' ' <<< "${GF_INSTALL_PLUGINS}")
read -r -a gf_plugins_list <<< "$splitted_plugin_list"
for plugin in "${gf_plugins_list[@]}"; do
grafana_install_plugin_args=("--pluginsDir" "$GF_PATHS_PLUGINS")
plugin_id="$plugin"
if echo "$plugin" | grep "=" > /dev/null 2>&1; then
splitted_plugin_entry=$(tr '=' ' ' <<< "${plugin}")
read -r -a plugin_url_array <<< "$splitted_plugin_entry"
echo "Installing plugin with id ${plugin_url_array[0]} and url ${plugin_url_array[1]}"
plugin_id="${plugin_url_array[0]}"
grafana_install_plugin_args+=("--pluginUrl" "${plugin_url_array[1]}")
else
echo "Installing plugin with id ${plugin_id}"
fi
if [[ "${GF_INSTALL_PLUGINS_SKIP_TLS:-}" = "yes" ]]; then
grafana_install_plugin_args+=("--insecure")
fi
grafana_install_plugin_args+=("plugins" "install" "${plugin_id}")
grafana-cli "${grafana_install_plugin_args[@]}"
done
fi
exec /opt/bitnami/grafana/bin/grafana-server \
--homepath=/opt/bitnami/grafana/ \
--config="$GF_PATHS_CONFIG" \
cfg:default.log.mode="console" \
cfg:default.paths.data="$GF_PATHS_DATA" \
cfg:default.paths.logs="$GF_PATHS_LOGS" \
cfg:default.paths.plugins="$GF_PATHS_PLUGINS" \
cfg:default.paths.provisioning="$GF_PATHS_PROVISIONING" \
"$@"

View File

@ -4,13 +4,13 @@ Grafana is an open source, feature rich metrics dashboard and graph editor for G
[https://grafana.com](https://grafana.com)
## TL;DR;
# TL;DR;
```console
$ docker run --name grafana bitnami/grafana:latest
```
## Why use Bitnami Images?
# Why use Bitnami Images?
* Bitnami closely tracks upstream source changes and promptly publishes new versions of this image using our automated systems.
* With Bitnami images the latest bug fixes and features are available as soon as possible.
@ -21,26 +21,20 @@ $ docker run --name grafana bitnami/grafana:latest
> This [CVE scan report](https://quay.io/repository/bitnami/grafana?tab=tags) contains a security report with all open CVEs. To get the list of actionable security issues, find the "latest" tag, click the vulnerability report link under the corresponding "Security scan" field and then select the "Only show fixable" filter on the next page.
## How to deploy Grafana in Kubernetes?
Deploying Bitnami applications as Helm Charts is the easiest way to get started with our applications on Kubernetes. Read more about the installation in the [Bitnami Grafana Chart GitHub repository](https://github.com/bitnami/charts/tree/master/bitnami/grafana).
Bitnami containers can be used with [Kubeapps](https://kubeapps.com/) for deployment and management of Helm Charts in clusters.
## Why use a non-root container?
# Why use a non-root container?
Non-root container images add an extra layer of security and are generally recommended for production environments. However, because they run as a non-root user, privileged tasks are typically off-limits. Learn more about non-root containers [in our docs](https://docs.bitnami.com/tutorials/work-with-non-root-containers/).
## Supported tags and respective `Dockerfile` links
# Supported tags and respective `Dockerfile` links
Learn more about the Bitnami tagging policy and the difference between rolling tags and immutable tags [in our documentation page](https://docs.bitnami.com/tutorials/understand-rolling-tags-containers/).
* [`6-debian-10`, `6.7.4-debian-10-r0`, `6`, `6.7.4`, `latest` (6/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-grafana/blob/6.7.4-debian-10-r0/6/debian-10/Dockerfile)
* [`6-debian-10`, `6.7.4-debian-10-r1`, `6`, `6.7.4`, `latest` (7/debian-10/Dockerfile)](https://github.com/bitnami/bitnami-docker-grafana/blob/6.7.4-debian-10-r1/7/debian-10/Dockerfile)
Subscribe to project updates by watching the [bitnami/grafana GitHub repo](https://github.com/bitnami/bitnami-docker-grafana).
## Get this image
# Get this image
The recommended way to get the Bitnami Grafana Docker Image is to pull the prebuilt image from the [Docker Hub Registry](https://hub.docker.com/r/bitnami/grafana).
@ -57,24 +51,24 @@ $ docker pull bitnami/grafana:[TAG]
If you wish, you can also build the image yourself.
```console
$ docker build -t bitnami/grafana:latest 'https://github.com/bitnami/bitnami-docker-grafana.git#master:6/debian-10'
$ docker build -t bitnami/grafana:latest 'https://github.com/bitnami/bitnami-docker-grafana.git#master:7/debian-10'
```
## Connecting to other containers
# Connecting to other containers
Using [Docker container networking](https://docs.docker.com/engine/userguide/networking/), a different server running inside a container can easily be accessed by your application containers and vice-versa.
Containers attached to the same network can communicate with each other using the container name as the hostname.
### Using the Command Line
## Using the Command Line
#### Step 1: Create a network
### Step 1: Create a network
```console
$ docker network create grafana-network --driver bridge
```
#### Step 2: Launch the grafana container within your network
### Step 2: Launch the grafana container within your network
Use the `--network <NETWORK>` argument to the `docker run` command to attach the container to the `grafana-network` network.
@ -82,13 +76,13 @@ Use the `--network <NETWORK>` argument to the `docker run` command to attach the
$ docker run --name grafana-node1 --network grafana-network bitnami/grafana:latest
```
#### Step 3: Run another containers
### Step 3: Run another containers
We can launch another containers using the same flag (`--network NETWORK`) in the `docker run` command. If you also set a name to your container, you will be able to use it as hostname in your network.
## Configuration
# Configuration
### Dev config
## Dev config
Create a `custom.ini` in the conf (`/opt/bitnami/grafana/conf`) directory to override default configuration options. You only need to add the options you want to override. Config files are applied in the order of:
@ -99,7 +93,7 @@ custom.ini
In your `custom.ini` uncomment (remove the leading ;) sign. And set `app_mode = development`.
### Production config
## Production config
Override the `/opt/bitnami/grafana/conf/grafana.ini` file mounting a volume.
@ -119,7 +113,7 @@ grafana:
...
```
### Install plugins at initialization
## Install plugins at initialization
When you start the Grafana image, you can specify a comma, semi-colon or space separated list of plugins to install by setting the env. variable `GF_INSTALL_PLUGINS`. The entries in `GF_INSTALL_PLUGINS` have two different formats:
@ -144,7 +138,7 @@ $ docker run -d --name grafana -p 3000:3000 \
bitnami/grafana:latest
```
### Grafana Image Renderer plugin
## Grafana Image Renderer plugin
You can install the [Grafana Image Renderer plugin](https://github.com/grafana/grafana-image-renderer) to handle rendering panels and dashboards as PNG images. To install the plugin, follow the instructions described in the [previous section](#install-plugins-at-initialization).
@ -172,7 +166,7 @@ services:
ENABLE_METRICS: 'true'
```
## Logging
# Logging
The Bitnami Grafana Docker image sends the container logs to the `stdout`. To view the logs:
@ -182,19 +176,19 @@ $ docker logs grafana
You can configure the containers [logging driver](https://docs.docker.com/engine/admin/logging/overview/) using the `--log-driver` option if you wish to consume the container logs differently. In the default configuration docker uses the `json-file` driver.
## Maintenance
# Maintenance
### Upgrade this image
## Upgrade this image
Bitnami provides up-to-date versions of grafana, including security patches, soon after they are made upstream. We recommend that you follow these steps to upgrade your container.
#### Step 1: Get the updated image
### Step 1: Get the updated image
```console
$ docker pull bitnami/grafana:latest
```
#### Step 2: Stop and backup the currently running container
### Step 2: Stop and backup the currently running container
Stop the currently running container using the command
@ -210,13 +204,13 @@ $ rsync -a /path/to/grafana-persistence /path/to/grafana-persistence.bkp.$(date
You can use this snapshot to restore the database state should the upgrade fail.
#### Step 3: Remove the currently running container
### Step 3: Remove the currently running container
```console
$ docker rm -v grafana
```
#### Step 4: Run the new image
### Step 4: Run the new image
Re-create your container from the new image, [restoring your backup](#restoring-a-backup) if necessary.
@ -224,21 +218,21 @@ Re-create your container from the new image, [restoring your backup](#restoring-
$ docker run --name grafana bitnami/grafana:latest
```
## Notable Changes
# Notable Changes
### 6.7.3-debian-10-r28
## 6.7.3-debian-10-r28
- The `GF_INSTALL_PLUGINS` environment variable is not set by default anymore. This means it doesn't try to install the [`grafana-image-renderer` plugin](https://github.com/grafana/grafana-image-renderer) anymore unless you specify it. As an alternative to install this plugin, you can use the [Grafana Image Renderer container](https://github.com/bitnami/bitnami-docker-grafana-image-renderer).
### 6.7.2-debian-10-r18
## 6.7.2-debian-10-r18
- Grafana doesn't ship the [`grafana-image-renderer` plugin](https://github.com/grafana/grafana-image-renderer/) by default anymore since it's not compatible with K8s distros with IPv6 disable. Instead, the `GF_INSTALL_PLUGINS` environment variable is set by default including this plugin so it's installed during the container's initialization, users can easily avoid it by overwriting the environment variable.
## Contributing
# Contributing
We'd love for you to contribute to this container. You can request new features by creating an [issue](https://github.com/bitnami/bitnami-docker-grafana/issues), or submit a [pull request](https://github.com/bitnami/bitnami-docker-grafana/pulls) with your contribution.
## Issues
# Issues
If you encountered a problem running this container, you can file an [issue](https://github.com/bitnami/bitnami-docker-grafana/issues/new). For us to provide better support, be sure to include the following information in your issue:
@ -248,8 +242,7 @@ If you encountered a problem running this container, you can file an [issue](htt
- Version of this container
- The command you used to run the container, and any relevant output you saw (masking any sensitive information)
## License
# License
Copyright (c) 2020 Bitnami
Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -2,7 +2,7 @@ version: '2'
services:
grafana:
image: bitnami/grafana:6
image: bitnami/grafana:7
ports:
- '3000:3000'
environment: