Run gitea in rootless mode as a specific uid #6916

Closed
opened 2025-11-02 07:11:01 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @martencassel on GitHub (Feb 23, 2021).

Would like to run gitea as a specific UID so it can access its files from a NFS share through Kerberos using the helm chart.
I don't know if the rootless work supports setting the uid ?

This scenario works for docker images such as postgres or minio. They will create the wanted user during startup.

2a79ea0332/dockerscripts/docker-entrypoint.sh (L100)
14f13e4b39/docker-entrypoint.sh (L67)

Originally created by @martencassel on GitHub (Feb 23, 2021). Would like to run gitea as a specific UID so it can access its files from a NFS share through Kerberos using the helm chart. I don't know if the rootless work supports setting the uid ? This scenario works for docker images such as postgres or minio. They will create the wanted user during startup. https://github.com/minio/minio/blob/2a79ea033206acfa74323e1719a869f8f6a69f1c/dockerscripts/docker-entrypoint.sh#L100 https://github.com/docker-library/postgres/blob/14f13e4b399ed1848fa24c2c1f5bd40c25732bdd/docker-entrypoint.sh#L67
GiteaMirror added the topic/distribution label 2025-11-02 07:11:01 -06:00
Author
Owner

@martencassel commented on GitHub (Feb 24, 2021):

It this supported in https://github.com/go-gitea/gitea/pull/14626 @Kreyren ?

@martencassel commented on GitHub (Feb 24, 2021): It this supported in https://github.com/go-gitea/gitea/pull/14626 @Kreyren ?
Author
Owner

@Kreyren commented on GitHub (Feb 24, 2021):

It this supported in https://github.com/go-gitea/gitea/pull/14626 @Kreyren ?

Partially implemented, is expected to change the UID, GID, names and other configuration through environment variable configuration

@Kreyren commented on GitHub (Feb 24, 2021): > It this supported in https://github.com/go-gitea/gitea/pull/14626 @Kreyren ? Partially implemented, is expected to change the UID, GID, names and other configuration through environment variable configuration
Author
Owner

@Kreyren commented on GitHub (Feb 24, 2021):

Also just to clarify: You seem to want to run the rootless gitea docker as specific user.. That should be already possible (e.g. su USER -c "docker-command-here" or optimization of service on sysadmin side)

The https://github.com/go-gitea/gitea/pull/14626 implement this handling inside of the docker container used for debugging purposes.

@Kreyren commented on GitHub (Feb 24, 2021): Also just to clarify: You seem to want to run the rootless gitea docker as specific user.. That should be already possible (e.g. `su USER -c "docker-command-here"` or optimization of service on sysadmin side) The https://github.com/go-gitea/gitea/pull/14626 implement this handling inside of the docker container used for debugging purposes.
Author
Owner

@Kreyren commented on GitHub (Feb 24, 2021):

EDIT: Also possible inside of the docker-compose using the user property documented in https://docs.gitea.io/en-us/install-with-docker-rootless/#custom-user

Consider joining the discord server on discord.gg/gitea if you need a guidance with it.

@Kreyren commented on GitHub (Feb 24, 2021): EDIT: Also possible inside of the docker-compose using the `user` property documented in https://docs.gitea.io/en-us/install-with-docker-rootless/#custom-user Consider joining the discord server on discord.gg/gitea if you need a guidance with it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6916