The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
grafana/docs/sources/installation/docker.md

42 lines
1.6 KiB

---
page_title: Installing using Docker
page_description: Grafana Installation guide using Docker container
page_keywords: grafana, installation, docker, container, guide
---
# Installing using Docker
> **2.0.2 -> 2.1.0 Upgrade NOTICE!**
> The data and log paths were not correct in the previous image. The grafana database was placed by default in /usr/share/grafana/data instead of the correct path /var/lib/grafana. This means it was not in a dir that was marked as a volume. So if you remove the container it will remove the grafana database. So before updating make sure you copy the /usr/share/grafana/data path from inside the container to the host.
## Install from official docker image
10 years ago
Grafana has an official Docker container.
10 years ago
$ docker run -i -p 3000:3000 grafana/grafana
All Grafana configuration settings can be defined using environment
variables, this is especially useful when using the above container.
10 years ago
## Docker volumes & ENV config
The Docker container exposes two volumes, the sqlite3 database in the
folder `/var/lib/grafana` and configuration files is in `/etc/grafana/`
folder. You can map these volumes to host folders when you start the
container:
10 years ago
$ docker run -d -p 3000:3000 \
-v /var/lib/grafana:/var/lib/grafana \
-e "GF_SECURITY_ADMIN_PASSWORD=secret" \
10 years ago
grafana/grafana:develop
In the above example I map the data folder and sets a configuration option via
an `ENV` instruction.
10 years ago
## Configuration
The back-end web server has a number of configuration options. Go the
[Configuration](../installation/configuration.md) page for details on all
those options.