mirror of
https://github.com/lldap/lldap.git
synced 2026-04-25 16:25:55 +03:00
[GH-ISSUE #755] [FEATURE REQUEST] Build rootless container image #274
Labels
No labels
backend
blocked
bug
cleanup
dependencies
docker
documentation
duplicate
enhancement
enhancement
frontend
github_actions
good first issue
help wanted
help wanted
integration
invalid
ldap
pull-request
question
rust
rust
tests
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/lldap-lldap#274
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @onedr0p on GitHub (Dec 10, 2023).
Original GitHub issue: https://github.com/lldap/lldap/issues/755
Motivation
LLDAP cannot not run as nonroot with strict security constraints because it uses gosu and chowns data on start. As a tool that is built for security, best practices should be followed and gosu should be removed in favor of the supported method provided by the Docker runtime.
github.com/lldap/lldap@70d85524db/docker-entrypoint.sh (L24-L26)The error I get is when I set
readOnlyRootFilesystemtotruein KubernetessecurityContext:Describe the solution you'd like
Remove gosu and support the official method of using the
useroption in Docker Compose:@onedr0p commented on GitHub (Dec 10, 2023):
I am willing to PR this change with the supporting docs around it.
@martadinata666 commented on GitHub (Dec 10, 2023):
Initially LLDAP also adopt that conformity, v0.3 *cmiiw. The
gosuwas used to solve installation on synology, or NAS software alike, essentially when deployed LLDAP got permission error to read/write/dataand/appeven when specifyuser: xxxx:xxxx. Tbf I don't use syno, so I don't know how their mounting permission works. If this can be cleared up maybe we can adopt docker method.@onedr0p commented on GitHub (Dec 10, 2023):
This would be a breaking change for some users of the project, because they will need to adopt the official way to handle it. It's been years since I ran Syno but IIRC it is just docker-compose. So as long as the user sets that
uservar andchowns the data folder themselves prior to deploying lldap or uses theuid:gidthat already is set on the lldap data folder they should not have an issue.@nitnelave commented on GitHub (Dec 10, 2023):
The current image uses gosu in order to solve common permission problems
that made installation harder. I'd like to keep it that way, in part
because of compatibility reasons.
However, I'm entirely open to also having a non root image that you can opt
into, with a sightly different entry point. We can automate it in GitHub
actions to have both images kept up to date.
Would that work for you?
On Sun, 10 Dec 2023, 16:21 Devin Buhl, @.***> wrote:
@onedr0p commented on GitHub (Dec 10, 2023):
That works, the way I've seen other projects do that is by adding a
-non-rootsuffix to the tag. I have updated the issue title.@martadinata666 commented on GitHub (Dec 28, 2023):
Added support with
rootlessimage. It expected run with user 1000 by default, override withuser: xxxx:yyyy.But I'm not really sure how it interacts with this
The error I get is when I set readOnlyRootFilesystem to true in Kubernetes securityContext:@nitnelave commented on GitHub (Dec 28, 2023):
The new entrypoint doesn't try to chown/copy anything if the config file already exists, so it should be compatible with a read-only FS