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

[Feature] Add PUID and PGID environment variables to run docker container as non-root user #95

Closed
garret opened this issue Jun 20, 2021 · 3 comments

Comments

@garret
Copy link

garret commented Jun 20, 2021

Every single linuxserver.io docker container has this option which I think is amazing: https://docs.linuxserver.io/general/understanding-puid-and-pgid

I would like to run changedetection.io as a particular user, which would solve a lot of permission issues. In all LSIO containers I just set the PUID and PGID environment variables and boom, the containers runs as that user.

Would it be possible to add such a feature? It makes managing Docker containers much easier.

@dgtlmoon
Copy link
Owner

Cant' you just add the following to your docker-compose.yml

environment:
  - PUID=1000
  - PGID=1000

?

doesnt that solve your situation as per the documentation in that link?

I could add it but it would break the existing installations I think, i'll add it as a commented out block

@dgtlmoon
Copy link
Owner

I dont know how to solve this one for where people already have data in /datastore owned by root from previous installs ;(

dgtlmoon added a commit that referenced this issue Jun 21, 2021
@garret
Copy link
Author

garret commented Jun 21, 2021

Yes, it is true. I confirm that setting the PUID and PGID as environment variables it works. I thought that because you had not specified in the documentation then they would not work.

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