You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 7, 2018. It is now read-only.
On some systems (Synology) this image will run into permissions problems (if you don't 777 your docker volume directory) because the PID / GID is set wrong. It would be great if these two env variables would be supported. This would solve issues like that one without some hacky 777 workaround: #32
Sometimes when using data volumes (-v flags) permissions issues can arise between the host OS and the container. We avoid this issue by allowing you to specify the user PUID and group PGID. Ensure the data volume directory on the host is owned by the same user you specify and it will "just work" ™.
Just to add a bit more of background: it is impossible to expect the "grafana" user's UID inside the container will match a given user outside of the container. Given that a lot of the use cases call for a volume to store persistent data across container restarts, there's a few failure scenarios:
The host does not have a "grafana" user (and why should it have? the point of the container is to minimize changes to the host...)
The host does have a "grafana" user, but the UIDs don't match, e.g. the grafana user was created as a "system" user
You start your containers with e.g. --user=1050 which means the processes are not able to chmod/chown stuff in run.sh, and the shebang at the top causes it to exit right away
I see why you made it not run as root on #16 but I think a better solution would be to modify run.sh to:
check the current UID
if the UID is 0 you can either: keep the current behavior (default to running as "grafana") or error out with a helpful suggestion about running as a non-root user
Just a note that this is something I'd like to see fixed as well. There is a way to do it with a custom Dockerfile (see grafana/grafana#6285) but many other docker images have this functionality built in (e.g., most LinuxServer.io packages).
We're shipping Grafana 5.1 with a new docker image that will allow docker run --user <your id> grafana/grarfana to be used when starting Grafana to work around uid/gid issues. It's not released yet but the image can be found here #146.
On some systems (Synology) this image will run into permissions problems (if you don't 777 your docker volume directory) because the PID / GID is set wrong. It would be great if these two env variables would be supported. This would solve issues like that one without some hacky 777 workaround: #32
Example how other containers do it:
https://github.com/linuxserver/docker-rutorrent#user--group-identifiers
That's how other images implement it:
https://github.com/cpoppema/docker-flexget/blob/master/init/90_new_user.sh
Thanks
The text was updated successfully, but these errors were encountered: