Docker volumes & ENV config

On this page it says “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:”

Then it shows an example…

$ docker run -d -p 3000:3000
-v /var/lib/grafana:/var/lib/grafana

If I add "-v /etc/grafana:/etc/grafana " I don’t get a grafana.ini in my mapped folder and the instance goes into a restart loop.

The folder is empty. Is it looking for a ‘grafana.ini’ file and not finding it and that is why it keeps restarting?

Probably. You can check the error message by running:

docker logs <container id of your grafana instance>

You can get the container id by executing: docker ps

I just answered a very similar question (think we need to update the docs):

Got it. Thank you again!