-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Add -u git to docs when using docker exec with root installation #29314
Add -u git to docs when using docker exec with root installation #29314
Conversation
isn't that only valid for the rootles containers? |
No. The docker exec command is run in the container as the same user that the build the container if no With root image: # id command output when starting the container
$ docker run --entrypoint id gitea/gitea:1.21.5
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)
# id command output when execing into an existing container
$ docker exec gitea id
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video) With rootless image: # id command output when starting the container
$ docker run --entrypoint id gitea/gitea:1.21.5-rootless
uid=1000(git) gid=1000(git) groups=1000(git)
# id command output when execing into an existing container
$ docker exec gitea_rootless id
uid=1000(git) gid=1000(git) groups=1000(git) The only reason the gitea server even starts with the root configuration is because it is run with |
…gitea#29314) This fixes a minor issue in the documentation for SSH Container Passthrough for non-rootless installs. The non-rootless Dockerfile and docker-compose do not set `USER`/`user` instructions so `docker exec` will run as root by default. While running as root, gitea commands will refuse to execute, breaking these approaches. For containers built with the rootless instructions, `docker exec` will run as git by default so this is not necessary in that case. This issue was already discussed in go-gitea#19065, but it does not appear this part of the issue was ever added to the documentation.
…gitea#29314) This fixes a minor issue in the documentation for SSH Container Passthrough for non-rootless installs. The non-rootless Dockerfile and docker-compose do not set `USER`/`user` instructions so `docker exec` will run as root by default. While running as root, gitea commands will refuse to execute, breaking these approaches. For containers built with the rootless instructions, `docker exec` will run as git by default so this is not necessary in that case. This issue was already discussed in go-gitea#19065, but it does not appear this part of the issue was ever added to the documentation.
) (#30258) Backport #29314 by @scribblemaniac This fixes a minor issue in the documentation for SSH Container Passthrough for non-rootless installs. The non-rootless Dockerfile and docker-compose do not set `USER`/`user` instructions so `docker exec` will run as root by default. While running as root, gitea commands will refuse to execute, breaking these approaches. For containers built with the rootless instructions, `docker exec` will run as git by default so this is not necessary in that case. This issue was already discussed in #19065, but it does not appear this part of the issue was ever added to the documentation. Co-authored-by: scribblemaniac <scribblemaniac@users.noreply.github.com>
) (#30259) Backport #29314 by @scribblemaniac This fixes a minor issue in the documentation for SSH Container Passthrough for non-rootless installs. The non-rootless Dockerfile and docker-compose do not set `USER`/`user` instructions so `docker exec` will run as root by default. While running as root, gitea commands will refuse to execute, breaking these approaches. For containers built with the rootless instructions, `docker exec` will run as git by default so this is not necessary in that case. This issue was already discussed in #19065, but it does not appear this part of the issue was ever added to the documentation. Co-authored-by: scribblemaniac <scribblemaniac@users.noreply.github.com>
* giteaofficial/main: Refactor "dump" sub-command (go-gitea#30240) Add -u git to docs when using docker exec with root installation (go-gitea#29314) Show 12 lines in markup code preview (go-gitea#30255) Fixes go-gitea#27605: inline math blocks can't be preceeded/followed by alphanumerical characters (go-gitea#30175) Render embedded code preview by permlink in markdown (go-gitea#30234) Fix missing 0 prefix of GPG key id (go-gitea#30245) Fix spacing in issue navbar (go-gitea#30238) Add unique index for project_issue to prevent duplicate data (go-gitea#30190) [skip ci] Updated translations via Crowdin Refactor commit signature parser (go-gitea#30228) Refactor dropzone (go-gitea#30232) Remove scheduled action tasks if the repo is archived (go-gitea#30224) Refactor file view & render (go-gitea#30227) Refactor DeleteInactiveUsers, fix bug and add tests (go-gitea#30206) [skip ci] Updated licenses and gitignores Add `/options/license` and `/options/gitignore` to `.ignore` (go-gitea#30219)
I was unable to create a backport for 1.22. @scribblemaniac, please send one manually. 🍵
|
) (#30264) Backport #29314 by @scribblemaniac This fixes a minor issue in the documentation for SSH Container Passthrough for non-rootless installs. The non-rootless Dockerfile and docker-compose do not set `USER`/`user` instructions so `docker exec` will run as root by default. While running as root, gitea commands will refuse to execute, breaking these approaches. For containers built with the rootless instructions, `docker exec` will run as git by default so this is not necessary in that case. This issue was already discussed in #19065, but it does not appear this part of the issue was ever added to the documentation. Co-authored-by: scribblemaniac <scribblemaniac@users.noreply.github.com>
I'm assuming this is a bug with the bot. It appears to have been backported to 1.22 just fine in #30259. |
@scribblemaniac yup, all is well, nothing more needed for you to do. Thanks for the PR :) |
…gitea#29314) This fixes a minor issue in the documentation for SSH Container Passthrough for non-rootless installs. The non-rootless Dockerfile and docker-compose do not set `USER`/`user` instructions so `docker exec` will run as root by default. While running as root, gitea commands will refuse to execute, breaking these approaches. For containers built with the rootless instructions, `docker exec` will run as git by default so this is not necessary in that case. This issue was already discussed in go-gitea#19065, but it does not appear this part of the issue was ever added to the documentation.
This fixes a minor issue in the documentation for SSH Container Passthrough for non-rootless installs. The non-rootless Dockerfile and docker-compose do not set
USER
/user
instructions sodocker exec
will run as root by default. While running as root, gitea commands will refuse to execute, breaking these approaches. For containers built with the rootless instructions,docker exec
will run as git by default so this is not necessary in that case.This issue was already discussed in #19065, but it does not appear this part of the issue was ever added to the documentation.