Feature request : docker : set PUID and PGID in environment

All your suggestions, requests and ideas for future development
Post Reply
pcl94
Posts: 2
Joined: 11 May 2021, 14:29

Feature request : docker : set PUID and PGID in environment

Post 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
User avatar
rednoah
The Source
Posts: 22899
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post 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
:idea: Please read the FAQ and How to Request Help.
pcl94
Posts: 2
Joined: 11 May 2021, 14:29

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

Post 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?
Post Reply