Skip to content

Add support for PROSODY_USERID to configure runtime UID, fixes #39#55

Open
mwild1 wants to merge 1 commit into
masterfrom
prosody-userid
Open

Add support for PROSODY_USERID to configure runtime UID, fixes #39#55
mwild1 wants to merge 1 commit into
masterfrom
prosody-userid

Conversation

@mwild1

@mwild1 mwild1 commented Mar 1, 2019

Copy link
Copy Markdown
Member

No description provided.

Comment thread entrypoint.sh

if [ "$PROSODY_USERID" != "101" ]; then
usermod -u "$PROSODY_USERID" prosody;
groupmod -g "$PROSODY_USERID" prosody;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you can count on user id being equal to group id. Looks like the later is 102 when I look here.

Comment thread Dockerfile

EXPOSE 80 443 5222 5269 5347 5280 5281
USER prosody

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What makes it run as the prosody user then?

@Zash

Zash commented Jan 30, 2020

Copy link
Copy Markdown
Member

Is this crazy enough to work?

ENTRYPOINT ["/bin/sh", "-c", "usermod -u $(stat -c %u /var/lib/prosody/.) prosody && \
    runuser -u prosody -- /usr/bin/prosody -F"]

@Zash

Zash commented Feb 13, 2020

Copy link
Copy Markdown
Member

Is #62 enough and this can be closed or is an override like this needed?

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

Successfully merging this pull request may close these issues.

2 participants