grafana-sync
grafana-sync copied to clipboard
Allow to specify the user when running the docker
To pull my dashboards, I use:
docker run --rm \
--volume "$(pwd)/grafana-dash:/data" \
--network "monitor-net" \
ghcr.io/mpostument/grafana-sync:1.4.10 \
pull-dashboards --apikey="<...>" --directory="/data" --url http://grafana:3000
But this creates a folder owned by root and require to chown it.
What I would like is to have the ability to specify the user as a parameter to the docker run, like:
$ docker run --rm \
--volume "$(pwd)/grafana-dash:/data" \
--network "monitor-net" \
--user 1000:1000 \
ghcr.io/mpostument/grafana-sync:1.4.10 \
pull-dashboards --apikey="<...>" --directory="/data" --url http://grafana:3000
2023/02/02 17:33:43 Pull dashboards command failed open /data/docker-containers.json: permission denied
Thank you for reporting, i will take a look