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

Adds support for PUID/PGID to Docker. #18

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Adds support for PUID/PGID to Docker. #18

wants to merge 5 commits into from

Conversation

spencerhughes
Copy link

@spencerhughes spencerhughes commented Jan 15, 2021

Adds support for changing the UID and GID at runtime by executing the app from a wrapper script that creates a container user with the appropriate UID/GID. Also updates the documentation to reflect the two new variables. I built an image based on this that's available for testing at spencerhughes/podgrab.

Fixes for #16 #12

@ksurl
Copy link
Contributor

ksurl commented Jan 18, 2021

no user creation needed if you use su-exec and specify the UID and GID directly

apk add su-exec

su-exec ${PUID:-1000}:${PGID:-1000} app

you could set ENV=1000 instead of using default value in bash variable

@ksurl
Copy link
Contributor

ksurl commented Jan 18, 2021

you can also user -u in docker cli or user: in compose

@spencerhughes
Copy link
Author

spencerhughes commented Jan 21, 2021

Oh cool I didn't know about su-exec, I'll update the branch to use that methodology instead.

EDIT: ok the branch has been updated to use su-exec. I also forgot to chown the app folders so I fixed that too.

@akhilrex
Copy link
Owner

Hi

Sorry for the delay. Got tied up with some work. Thanks a lot for this. Let me test this locally and merge this.

@alanwink13
Copy link

Hey

Any chance to have this merged? This option seems necessary to make Podgrab work with NFS shares (or at least to make it work in my setup 😛).

Copy link

@thebiblelover7 thebiblelover7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, would be great to get this merged! It's been more than a year already!

@ArthurHuyghe
Copy link

Any updates? Its been over 3 years now...

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

Successfully merging this pull request may close these issues.

None yet

6 participants