I am trying to setup grafana on docker using a custom grafana.ini file, however grafana is not picking up my config, I am using the command below
docker run -d -p 3000:3000 \
-v /opt/pf-grafana:/opt/pf-grafana \
grafana/grafana \
--config=/opt/pf-grafana/grafana.ini
I also verified that the grafana.ini file is correctly formatted. What am I missing?
Grafana.ini entry

Grafana logs

Contents of /opt/pf-grafana folder (ls from the container)

I finally got it working, the solution was to use environment variables, the "-e" flag overrides the default settings. The AUTH_LDAP_ENABLED and AUTH_LDAP_CONFIG_FILE are the settings in the default grafana.ini file. Note, they need to be specified in CAPS and separated by "_"
Below snippet worked for me
docker run -d -p 3000:3000 -v /opt/pf-grafana:/opt/pf-grafana \
-e "GF_AUTH_LDAP_ENABLED=true" \
-e "GF_AUTH_LDAP_CONFIG_FILE=/opt/pf-grafana/ldap.toml" \
grafana/grafana
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With