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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mwild1
Copy link
Member

@mwild1 mwild1 commented Mar 1, 2019

No description provided.


if [ "$PROSODY_USERID" != "101" ]; then
usermod -u "$PROSODY_USERID" prosody;
groupmod -g "$PROSODY_USERID" prosody;
Copy link
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.

@@ -49,6 +49,6 @@ RUN chmod 755 /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

EXPOSE 80 443 5222 5269 5347 5280 5281
USER prosody

Copy link
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
Copy link
Member

Zash commented Jan 30, 2020

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
Copy link
Member

Zash commented Feb 13, 2020

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