unclev / prosody-docker-extended

Docker image building system for the Prosody XMPP server with Community Modules and telnet console
MIT License
25 stars 9 forks source link

Add UID and GID at runtime #7

Open cwildfoerster opened 6 years ago

cwildfoerster commented 6 years ago

I know that it is possible to define the PUID and PGID and build time, but i like to just pull your container and would really like to define the UID and GID and runtime using environment variables like in many other containers. I'm running Ubuntu on my VPS and the default user which i use to adminstrate the whole machine uses 1000:1000 and i like to define specific users for every container i use. What do you guys think?

unclev commented 6 years ago

There is build-in docker feature of specifying UID and GID when starting docker containers (external link to medium.com).

I haven't tried that so far.

The problem here that I designed the prosody-docker-extended with prosody group and user pre-defined at build time, so when prosody package is being installed within the image it "re-uses" this "prosody" user. Later in the Dockerfile it is said just switch to prosody user. If I understand right, changing UID and GID would cause it merely executes as a different user.

So at least

I'm sorry, it's not my priority at the moment.

If anybody would "play" with the feature, - pull requests are welcome.

unclev commented 4 years ago

The related issues: #6 , #16 .