Skip to content
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

Allow to specify the user when running the docker #92

Open
simone-viozzi opened this issue Feb 2, 2023 · 1 comment
Open

Allow to specify the user when running the docker #92

simone-viozzi opened this issue Feb 2, 2023 · 1 comment

Comments

@simone-viozzi
Copy link

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
@mpostument
Copy link
Owner

Thank you for reporting, i will take a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants