Page 1 of 1

Feature request : docker : set PUID and PGID in environment

Posted: 11 May 2021, 14:52
by pcl94
I'm using filebot on docker platform, as done by linuxserver team for containers, can you implement some environment variables like :
- PUID=1234
- PGID=56789

So this should cause file created (artworks, folder, etc...) on the host created / updated by this user id.
For now, all is created under "root" user.

As I understand they have a "abc" user into their image, and they update the UID and GID on startup of the container.
Something like this :

Code: Select all

#update foo user/group
usermod -u 2005 foo
groupmod -g 3000 foo
#update user/group of previous user/group ids
find /data -group 2000 -exec chgrp -h foo {} \;
find /data -user 1005 -exec chown -h foo {} \;
vote for me :) :D

Re: Feature request : docker : set PUID and PGID in environment

Posted: 11 May 2021, 15:00
by rednoah
Does the --user option not do this?
https://docs.docker.com/engine/reference/run/#user

I'm happy to accept a PR if someone has the use case and expertise to improve upon the existing docker files:
https://github.com/filebot/filebot-docker

Re: Feature request : docker : set PUID and PGID in environment

Posted: 11 May 2021, 18:06
by pcl94
Unfortunately no. I'm using only docker compose and this option is not available in it.

I may take a look, but I'm not an expert.
Anyone else?