-
Notifications
You must be signed in to change notification settings - Fork 73
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
Define User on Host #51
Comments
The user is mysql, with user id 100 and group id 101.
This is the default, to change the user would require amending the Dockerfile as the mysql user chowns the /run/mysqld & /var/lib/mysql directories.
You would probably have to rebuild the container, and amend to your liking. Maybe the Mariadb documentation has some more info for you https://mariadb.com/kb/en/documentation/ |
Hi @dominictayloruk , If there is any way to implement user change on docker-compose for this image this would help many setups in many ways and would much be appreciated. I really want to avoid setting up buildbots for changing that if there is any chance to implement this directly. I also found this issue: |
Whats the underlying storage setup? |
Hey @dominictayloruk thanks for trying to help with this 👍 I am using Docker on a Synology NAS and trying to set up nextcloud with alpine images. So here are some details how my setup will look like: I created a user (UID:1052 GID:100) that is used for all apps that will run docker containers. This user has full control of the folders and subfolders he is attached to including perm-changes. This is the compose file part of mariadb i am using. Note: I hardened the privileges for more security with no-new-privileges:true
These are the permissions set on the host system beforehand:
Using btrfs and the synology kernel 3.10 with DSM 7.2 on synology braswell (Intel cpu) 716+ and the synology reverse proxy for ssl Looking through the PR that fixed the issue in the original image tianon seems to have fixed it in this line 35 from here : Im not sure if and how it could be translated to alpine linux as my knowledge is a bit off here i think. |
I've been trying to change all of my containers to use a specific user on the host system, using the "user" config option in compose if the container doesn't support UID by default. This container seems to fail to start with that even if the ownership of directories are correct. This line seems most relevant but I'll link the full log "/usr/bin/mysqld: One can only use the --user switch if running as root" https://pastebin.com/53WYt41t Is this something that won't work with this container or am I doing just missing something?
The text was updated successfully, but these errors were encountered: