podgrab icon indicating copy to clipboard operation
podgrab copied to clipboard

Adds support for PUID/PGID to Docker.

Open spencerhughes opened this issue 4 years ago • 6 comments

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

spencerhughes avatar Jan 15 '21 03:01 spencerhughes

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 avatar Jan 18 '21 19:01 ksurl

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

ksurl avatar Jan 18 '21 20:01 ksurl

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.

spencerhughes avatar Jan 21 '21 20:01 spencerhughes

Hi

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

akhilrex avatar Jan 22 '21 06:01 akhilrex

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 😛).

alanwink13 avatar Sep 09 '21 02:09 alanwink13