Ability to set custom GID and UID

Open
#118 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
docker, shell

Research direction

Start with the Dockerfile and inspect how the ejabberd user is created with UID and GID 9000. Check how environment values are passed into the image and preserve 9000 as the default. Done means the image can use custom UID and GID values for ejabberd while retaining the existing default behavior.

Written by the indexing model from the issue text.

Description

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)?

Dominant language
Shell
Stars
101
Forks
77
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from processone/docker-ejabberd

All issues in processone/docker-ejabberd

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.