docker-influxdb-grafana
docker-influxdb-grafana copied to clipboard
Grafana fails on start due to file system perms
grafana | GF_PATHS_DATA='/var/lib/grafana' is not writable. grafana | You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migration-from-a-previous-version-of-the-docker-container-to-5-1-or-later grafana | mkdir: cannot create directory '/var/lib/grafana/plugins': Permission denied grafana exited with code 1
I added user: "0" as a workaround which got the container up and running, so the grafana part looks like this:
image: grafana/grafana:latest
container_name: grafana
ports:
- "3000:3000"
env_file:
- 'env.grafana'
user: "0"
links:
- influxdb
volumes:
# Data persistency
# sudo mkdir -p /srv/docker/grafana/data; chown 472:472 /srv/docker/grafana/data
- /srv/docker/grafana/data:/var/lib/grafana
user: "0"
grafana | mkdir: cannot create directory '/var/lib/grafana/plugins': Permission denied
I have this problem after adding user to grafana.
Looks to be associated with directory perms, try running on the docker host: sudo chown -R 472:472 /srv/docker/grafana/data
Is there a permanent fix rather than having to chown the local grafana directory every-time I create a new deployment on a machine?