-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Use of su-exec now requires container be started as root #2907
Comments
Hi, thanks for the heads-up. TBH the Dockerfile situation is pretty frustrating, there have been some breaking changes in the past and every iteration seems to have problems. |
Yea this isn't kubernetes-specific. My docker-compose which enforces uid & gid = 1000 broke too. |
Looking through the minio issue I saw that they have a fallback for the su-exec command, which works for @st3iny since Kubernetes should take care of the permissions. But would probably also need a fallback for the chown in that case. |
I prefer the current solution because it makes the image more self-contained and secure by default. In my opinion, using security contexts is more of a crutch to fix overprivileged containers/apps. I was also able to drop my init container that I added to fix the default permissions inside the persistent volume. This change should just be communicated in a clear way because this change breaks some setups and requires manual intervention to fix. It is already documented in the release notes but it wouldn't hurt to amend the wiki as well (e.g. here and here). |
I added some details based on my limited understanding. Wiki is publicly editable, correcting/improving information is highly appreciated. |
Good to know! I amended the kubernetes page with some more information. |
Well then let me pass a thank you on, being able to maintain my own server to sync to is one of the things I adore about Trilium. Apologies that doing so has been so frustrating. |
I'm closing this issue because it is documented well enough now. |
Trilium Version
0.52.2
What operating system are you using?
Other Linux
What is your setup?
Server access only
Operating System Version
Kubernetes
Description
There was a breaking change in #2864 that breaks Kubernetes setups which use a securityContext to change the uid. This also potentially breaks dockerfiles and docker-compose setups that try to change the uid.
The binary
su-exec
has to be run as root. Otherwise, there will be errors on execution likesu-exec: setgroups: Operation not permitted
and the app won't start.I'm fine with this change but encourage you to add it to the release notes.
This is a common issue, e.g. minio/minio#7773
The text was updated successfully, but these errors were encountered: