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

User switching not working 100%, even though its already in documentation #621

Open
PaBox opened this issue Nov 21, 2024 · 1 comment
Open
Labels
need feedback Need feedback from user.

Comments

@PaBox
Copy link

PaBox commented Nov 21, 2024

Hi, I have been testing the user setting in docker compose and when binding the mount to a local folder, mariadb crashes on startup with missing permissions after setting the folder permissions to 999:999. I am trying to run mariadb as 1599:1600 together with an array of other servers that are running as 1600:1600, 1601:1600, ... which is working, if the container is executed without a supplied user, shut down and the directory permissions are corrected recursively to 1599:1600 - this will skip part of the entrypoint on the next launch, as all the files are already created and THEN its possible to change the user.

So I have read literally hundreds ob messages and forum posts about this and I just can't understand why its doing this. Never had this issue with mysql. But maybe thats also due to the persistent volume/folder.

How can this be fixed in the project? As it isn't really viable to create a Dockerfile just for this and put a bandaid on it.

Going by the FAQ this is already supported:
https://mariadb.com/kb/en/docker-official-image-frequently-asked-questions/#can-i-run-the-mariadb-container-as-an-arbitrary-user

It states: Can I run the MariaDB container as an arbitrary user? Yes. [...]

So this should be fixed so that the image may just take environment variables or get the current user id and sets the id of the mysql user itself - this would make this compose file way better. Maybe take a look at the one from mysql...

Greetings :)

@grooverdan
Copy link
Member

grooverdan commented Nov 25, 2024

Yes its all around persistent volumes.

UID outside the container isn't necessary the same as user inside the container in rootless mode.

Environment variables of user aren't more useful than running the container as user: xxxx.

MySQL is the same in this respect.

Actual container runtime information would be useful along with rootless/full mode.

@grooverdan grooverdan added the need feedback Need feedback from user. label Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need feedback Need feedback from user.
Development

No branches or pull requests

2 participants