Change grafana.ini in docker install

I am using grafana with a basic docker installation. How can I change the grafana.ini file inside the docker to set up new logs level?

Hi,

You can use Docker volumes to map your local config file to docker file as below:

 docker run --rm --mount type=bind,source=$PWD/custom.ini,target=/etc/grafana/grafana.ini -p 3000:3000 grafana/grafana

If it’s only for a small set of settings, you can also use environment variables:

docker run --rm -e "GF_USERS_DEFAULT_THEME=light" -p 3000:3000 grafana/grafana
1 Like

Thanks, I used this in a docker compose file and it seems to be good