Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changelog:
changed user management based on Best practices for writing Dockerfiles
it's better to set a consistent default uid/gid to avoid mismatches with future builds when upgrading
it's necessary to create the group/user beforehand instead by installing packages (there was a different uid/gid set for the /var/run/prosody dir in the latest build)
instead of gosu for root step-down we can use setpriv on debian
changed parent image to 'debian:stable-slim' - no need for a bloated image. no need to change the codename anymore when a new stable debian is released
Maintainer is deprecated using
LABEL maintainer
insteadThe entrypoint.sh will automatically adjust permissions for imported files with another uid/gid.
If you want to run prosody as a specific user you can do this:
docker-compose:
docker run cli:
docker run --user="1000:1000" --tmpfs /run/prosody:uid=1000,gid=1000 ...
But another user won't have access to /run/prosody
You either have to mount /run/prosody with the users uid/gid like above or change the path of the pidfile to one of your other mounted directories