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

Docker instance's environment variables (GITEA__xxx) are not respected in 1.20-rc1 #25481

Closed
wxiaoguang opened this issue Jun 24, 2023 · 0 comments · Fixed by #25480
Closed
Labels
topic/distribution This PR changes something about the packaging of Gitea type/bug
Milestone

Comments

@wxiaoguang
Copy link
Contributor

wxiaoguang commented Jun 24, 2023

Regression of #25330 :

Run Gitea's docker image:

...s/setting/setting.go:180:loadRunModeFrom() [F] Gitea is not supposed to be run as root. Sorry. If you need to use privileged TCP ports please instead use setcap and the `cap_net_bind_service` permission

Gitea Version

1.20

How are you running Gitea?

Docker

@wxiaoguang wxiaoguang added this to the 1.20.0 milestone Jun 24, 2023
@wxiaoguang wxiaoguang changed the title Docker instance's enviornemtns are not respected Docker instance's environment variables (GITEA__xxx) are not respected Jun 24, 2023
@wxiaoguang wxiaoguang changed the title Docker instance's environment variables (GITEA__xxx) are not respected Docker instance's environment variables (GITEA__xxx) are not respected in 1.20-rc1 Jun 24, 2023
6543 pushed a commit that referenced this issue Jun 24, 2023
…ssary checks (#25480)

Fix #25481

The `InitWorkPathAndCommonConfig` calls `LoadCommonSettings` which does
many checks like "current user is root or not".

Some commands like "environment-to-ini" shouldn't do such check, because
it might be run with "root" user at the moment (eg: the docker's setup
script)

ps: in the future, the docker's setup script should be improved to avoid
Gitea's command running with "root"
GiteaBot pushed a commit to GiteaBot/gitea that referenced this issue Jun 24, 2023
…ssary checks (go-gitea#25480)

Fix go-gitea#25481

The `InitWorkPathAndCommonConfig` calls `LoadCommonSettings` which does
many checks like "current user is root or not".

Some commands like "environment-to-ini" shouldn't do such check, because
it might be run with "root" user at the moment (eg: the docker's setup
script)

ps: in the future, the docker's setup script should be improved to avoid
Gitea's command running with "root"
6543 pushed a commit that referenced this issue Jun 24, 2023
…ssary checks (#25480) (#25488)

Backport #25480 by @wxiaoguang

Fix #25481

The `InitWorkPathAndCommonConfig` calls `LoadCommonSettings` which does
many checks like "current user is root or not".

Some commands like "environment-to-ini" shouldn't do such check, because
it might be run with "root" user at the moment (eg: the docker's setup
script)

ps: in the future, the docker's setup script should be improved to avoid
Gitea's command running with "root"

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 9, 2023
@delvh delvh added topic/distribution This PR changes something about the packaging of Gitea and removed theme/docker labels Oct 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic/distribution This PR changes something about the packaging of Gitea type/bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants