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

Ability to set custom GID and UID #118

Open
Mistra opened this issue Dec 22, 2024 · 1 comment
Open

Ability to set custom GID and UID #118

Mistra opened this issue Dec 22, 2024 · 1 comment

Comments

@Mistra
Copy link

Mistra commented Dec 22, 2024

Hello. I stumbled upon the same issue found in ticket #10
I'm not necrobumping a closed issue but here the problem I'm facing is similar. I'm using another user (actually, my user, GID 1000 and UID 1000) to run a Docker image that allows me to retrieve letsencrypt certificates.
The problem with these certificates is that some keys have and (must remain with) permissions set to 400. The only way to read them mounting the folder would be to change the folder user in the host making some automatism more tricky.

Long story short, the problem comes from the fact that GID and UID 9000 is an hardcoded value in the Dockerfile. Would it be possible to allow the image to set a custom UID/GID from the environment for the user ejabberd, keeping 9000 as the default?
I think I can provide a PR for this, in case, would you accept it (ofc after a review)?

@badlop
Copy link
Member

badlop commented Dec 30, 2024

Right, in the Dockerfile that builds the ecs container image, the ejabberd files are owned by ejabberd:ejabberd which have hardcoded IDs 9000:9000.

Notice that, in the Dockerfile that builds the ejabberd container image, the files IDs are defined in an argument, and set to 9000:9000 by default: https://github.com/processone/ejabberd/blob/7d5413ce95f3e9395f8d584469c5e016ebaaa689/.github/container/Dockerfile#L8

I think I can provide a PR for this, in case, would you accept it (ofc after a review)?

Yes, if you can provide a PR, I'd be happy to try it and probably merge it.

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

No branches or pull requests

2 participants