2016-10-21 04:01:34 -05:00
|
|
|
+++
|
|
|
|
title = "Installing using Docker"
|
|
|
|
description = "Installing Grafana using Docker guide"
|
|
|
|
keywords = ["grafana", "configuration", "documentation", "docker"]
|
|
|
|
type = "docs"
|
|
|
|
[menu.docs]
|
|
|
|
name = "Installing using Docker"
|
|
|
|
identifier = "docker"
|
|
|
|
parent = "installation"
|
|
|
|
weight = 4
|
|
|
|
+++
|
2015-04-13 00:34:55 -05:00
|
|
|
|
|
|
|
# Installing using Docker
|
|
|
|
|
2016-10-21 04:01:34 -05:00
|
|
|
Grafana is very easy to install and run using the offical docker container.
|
2015-04-13 00:55:07 -05:00
|
|
|
|
|
|
|
$ docker run -i -p 3000:3000 grafana/grafana
|
|
|
|
|
2015-05-10 15:52:40 -05:00
|
|
|
All Grafana configuration settings can be defined using environment
|
|
|
|
variables, this is especially useful when using the above container.
|
2015-04-13 00:55:07 -05:00
|
|
|
|
|
|
|
## Docker volumes & ENV config
|
|
|
|
|
2015-05-10 15:52:40 -05:00
|
|
|
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:
|
2015-04-13 00:55:07 -05:00
|
|
|
|
|
|
|
$ docker run -d -p 3000:3000 \
|
2015-04-14 09:53:54 -05:00
|
|
|
-v /var/lib/grafana:/var/lib/grafana \
|
2015-06-18 00:05:29 -05:00
|
|
|
-e "GF_SECURITY_ADMIN_PASSWORD=secret" \
|
2016-12-14 15:30:15 -06:00
|
|
|
grafana/grafana
|
2015-04-13 00:55:07 -05:00
|
|
|
|
2015-05-10 15:52:40 -05:00
|
|
|
In the above example I map the data folder and sets a configuration option via
|
|
|
|
an `ENV` instruction.
|
2015-04-13 00:55:07 -05:00
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
2015-05-10 15:52:40 -05:00
|
|
|
The back-end web server has a number of configuration options. Go the
|
2016-10-21 04:01:34 -05:00
|
|
|
[Configuration]({{< relref "configuration.md" >}}) page for details on all
|
2015-05-10 15:52:40 -05:00
|
|
|
those options.
|
2015-04-13 00:34:55 -05:00
|
|
|
|