-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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: rootless image #10154
docker: rootless image #10154
Conversation
Codecov Report
@@ Coverage Diff @@
## master #10154 +/- ##
==========================================
+ Coverage 42.14% 42.18% +0.03%
==========================================
Files 690 690
Lines 75871 75888 +17
==========================================
+ Hits 31975 32010 +35
+ Misses 38668 38645 -23
- Partials 5228 5233 +5
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine to me, I guess one thing I might suggest is to put a note in the app.ini stating that only internal SSH is supported on rootless installs
Speaking of “breaking” items, maybe we make the binary in this image FHS compliant? |
For FHS, I am hesitating for the binary path:
Since we don't have any file I would be in favor to put the binary directly to /usr/local/bin/gitea |
I think /usr/bin would even be appropriate as it's a pre-installed package |
@zeripath I have looked at docker-library official image and they tend to kept under /usr/local/bin everything that are not package managed (apt, apk, ...).
|
The only part that still isn't FHS compliant is that the config file is currently under |
@sapk, create a link? |
|
Rethinking of the config file for FHS, It maybe a good idea to separate it from the data folder since in most cases it is not needed to backup it and can be generated at each startup of container. The config file could still be backup but it would need to be explicitly defined (with an other volume) if needed. An other advantage is that someone that want to configure via variable would just need to restart the container and not rewrite the config file. |
I will re-add the wip label since I will make change that need to be retested. |
So can we get this merged at some point? |
I will intentionally not backport this commit ff50274#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557 |
3f90308
to
90f1255
Compare
90f1255
to
7fd8e42
Compare
This PR is ready for review. |
Please update with base branch |
I've run into an error when trying to install the helm chart on my local minikube, runAsNonRoot issues. After using the rootless images, the error is now : This happens because I use pod security policies. Is there any solution beside replacing |
@Grepsd please don't comment on closed issues/PRs as your comment will be lost. Please reach out on discord or discourse for support. |
@Grepsd I am not against using numeric id. The fact that your tool cannot verify the user is not root is strange since it is how it is done in most docker official image :
If you want to discuss more, create a issue on the subject or come on discord |
Please help to take a look at this one: Fix the mode of custom dir to 0700 in docker-rootless |
Replace #7129
This solution propose a new docker image tag
-rootless
with a image using internal ssh running with an unprivileged user.The main advantage is to provide a breaking solution that users can transition slowly and when adoption and returns are good should become the default.
This will allow us to break past mistake/compatibility for docker image.
How to build image
docker build -f Dockerfile.rootless -t gitea/gitea:latest-rootless .How to migrate/test
chown -R uid:gid /data volume of --user flag if needed