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

Launch Gitea with custom UID/GID for 'git' user (fixes #2286) #2791

Merged
merged 3 commits into from
Nov 5, 2017
Merged

Launch Gitea with custom UID/GID for 'git' user (fixes #2286) #2791

merged 3 commits into from
Nov 5, 2017

Conversation

HenrikBengtsson
Copy link
Contributor

Fixes #2286

@sapk
Copy link
Member

sapk commented Nov 2, 2017

LGTM

@tboerger tboerger added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Nov 2, 2017
@lunny
Copy link
Member

lunny commented Nov 2, 2017

@sapk how did you test that?

@sapk
Copy link
Member

sapk commented Nov 3, 2017

This method is used other image. You can test it (i haven't done it) by setting env variable at docker run. We could maybe provide a docker-copose.yml file now that the container is configurable by env variable.

Another solution for this problem, is to not create the user in the image (Dockerfile) and do a useradd with fixed UID and GID at startup of container.

@codecov-io
Copy link

codecov-io commented Nov 3, 2017

Codecov Report

Merging #2791 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2791   +/-   ##
=======================================
  Coverage   26.85%   26.85%           
=======================================
  Files          89       89           
  Lines       17607    17607           
=======================================
  Hits         4728     4728           
  Misses      12193    12193           
  Partials      686      686

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update be52315...8cc7f77. Read the comment docs.

@bkcsoft
Copy link
Member

bkcsoft commented Nov 4, 2017

LGTM (Seen this in other docker images as well)

@tboerger tboerger added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Nov 4, 2017
@HenrikBengtsson
Copy link
Contributor Author

Not a formal unit test, but see #2286 (comment) for a manual test that shows how both UID and GID are modified.

@lunny lunny added this to the 1.3.0 milestone Nov 5, 2017
@lunny lunny added the topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile label Nov 5, 2017
@lunny lunny merged commit 9bdce5d into go-gitea:master Nov 5, 2017
@bkcsoft
Copy link
Member

bkcsoft commented Nov 9, 2017

@HenrikBengtsson Unit-testing this would be very hard TBH. Since that would require the contributor to have docker installed. And in out CI it would mean running docker-in-docker which is a pain 😞

@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docker /app/gitea/gitea web runs as wrong user
6 participants