New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker permission error #6285
Comments
/var/lib/grafana needs to be accessible/writable by user running grafana-server, by default the user uses grafana |
But the user won't exist outside the container... I solved this by changing the userid and groupid of grafana to 1000, which is the usual user/group id for a single user. See discussion at moby/moby#7198 (comment) This is my Dockerfile
|
The problem is worse if you have read-only snapshots on your NFS share, since even with the above permission fix, grafana insists on owning files that are read-only, and the container fails. |
I'm using the official grafana/grafana image.
I'm using Vagrant with CoreOS as docker host. I have /var/lib/grafana mounted from the host, which is mounted through NFS.
My NFS server has this in /etc/exports
"/srv/vagrant/coreos-vagrant/shared" 172.17.8.101(rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000,fsid=893788748)
In my docker host I'm running:
docker run -i -p 3000:3000 -v /srv/grafana:/var/lib/grafana/ grafana/grafana
And docker logs grafana shows this:
chown: changing ownership of '/var/lib/grafana': Operation not permitted
Grafana is not running, the container keeps failing.
The text was updated successfully, but these errors were encountered: