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

No USER in dockerfile anymore #43

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

azlux
Copy link
Collaborator

@azlux azlux commented Jun 3, 2024

for #34

entrypoint.sh Outdated Show resolved Hide resolved
@azlux azlux marked this pull request as ready for review June 28, 2024 21:21
system, in order to cause minimal issues when accessing mounted volumes.
By default, the entrypoint will `chown` the `/data` folder to have good rights on the mounted folder. If your system don't allow changing owner from the container itself or if you don't want to entrypoint to modify the rights in any way other by you, you can set the environment variable : `MUMBLE_NO_CHOWN` to `true`.
Copy link
Member

@Krzmbrzl Krzmbrzl Jun 29, 2024

Choose a reason for hiding this comment

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

Suggested change
By default, the entrypoint will `chown` the `/data` folder to have good rights on the mounted folder. If your system don't allow changing owner from the container itself or if you don't want to entrypoint to modify the rights in any way other by you, you can set the environment variable : `MUMBLE_NO_CHOWN` to `true`.
By default, the entrypoint will `chown` the `/data` folder to have the necessary permissions in the mounted directory. If your system doesn't allow this from within the container or if you don't want this behavior for other reasons, you can set the environment variable : `MUMBLE_NO_CHOWN` to `true`.

groupmod -og "$MUMBLE_GID" mumble
usermod -ou "$MUMBLE_UID" mumble
if [[ "$MUMBLE_CHOWN" = true ]]; then
echo "Changing owner of folder {DATA_DIR}"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
echo "Changing owner of folder {DATA_DIR}"
echo "Changing owner of folder ${DATA_DIR}"

usermod -ou "$MUMBLE_UID" mumble
if [[ "$MUMBLE_CHOWN" = true ]]; then
echo "Changing owner of folder {DATA_DIR}"
chown -R mumble:mumble ${DATA_DIR}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
chown -R mumble:mumble ${DATA_DIR}
chown -R mumble:mumble "${DATA_DIR}"

echo "Changing owner of folder {DATA_DIR}"
chown -R mumble:mumble ${DATA_DIR}
fi
exec runuser -u mumble -g mumble -- "$@"
Copy link
Member

Choose a reason for hiding this comment

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

What does this do? If it starts the server, I don't think that should happen here (as well)

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