Setting UID/GID/USER is broken
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- docker
调研方向
未指定仓库文件或测试。首先跟踪 Docker 镜像针对 USER、UID 和 GID 的启动与权限处理入口,然后复现所提供的 docker-compose 配置。当配置的用户能够启动容器,并且 /data 和 /app 使用所请求的身份且没有 invalid-user 或 chown 错误时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
We had an issue where the docker image gameservermanagers/gameserver:css was setting UID and GID to 1000 which was the wrong user (even if user linuxgsm existed for example on id 1006) on our server and the volume (dir) would get chowned for the wrong user.
After noticing that it's set through ENV we added variable overrides to docker-compose.yml (some data is redacted):
version: "3.8"
services:
linuxgsm-css-bind:
image: gameservermanagers/gameserver:css
volumes:
- /home/combat/combat-css-server:/data
environment:
- USER=combat
- UID=1005
- GID=1005
But the docker image would still fail with:
combat-css-server | Switch to user combat
combat-css-server | =================================
combat-css-server | error: failed switching to "combat": unable to find user combat: no matching entries in passwd file
combat-css-server |
combat-css-server | Check Permissions
combat-css-server | =================================
combat-css-server | setting UID to 1005
combat-css-server | setting GID to 1005
combat-css-server | updating permissions for /data
combat-css-server | chown: invalid user: ‘combat:combat’
combat-css-server | updating permissions for /app
combat-css-server | chown: invalid user: ‘combat:combat’
The problem is that the user exists
# combat@noil:~$ id
uid=1005(combat) gid=1005(combat) groups=1005(combat),100(users),994(docker)
We are not and will not run docker or any other similar daemons or commands with sudo. The combat user is part of the docker group and is able to run docker images without sudo.
How should we proceed to start the linuxgsm (gameserver) on our combat user, so that the volume and the start scripts would get the correct UID/GID ?
Or is it only possible to start as non-root is with linuxgsm user and then deal with dir/file permissions so that combat user could modify files owned by linuxgam user ? (As it worked to start the docker image with user=linuxgsm,id=1006,gid=1006)
chmod 775 is not a solution, as everytime the docker container is started it overrides all ownerships and permissions
- 主要语言
- Shell
- 星标
- 345
- 派生
- 25
- 平均合并
- 12 小时 12 分钟
- 30 天内合并 PR
- 9
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
GameServerManagers/docker-gameserver 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 51/100
-
enhancement
难度 4/5 3-5 天 新手友好度 30/100
-
enhancement
难度 4/5 3-5 天 新手友好度 35/100
GameServerManagers/docker-gameserver#144 · 1 个 reaction ·
-
难度 4/5 3-5 天 新手友好度 38/100
GameServerManagers/docker-gameserver#142 · 2 条评论 ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 48/100
查看 GameServerManagers/docker-gameserver 的全部 Issue
相似的 Issue
-
documentation severity: low
难度 1/5 1 小时以内 新手友好度 88/100
luainkernel/lunatik#2231 ·
维护者通常 1 天内回复
-
good first issue
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 21 天内回复
-
Name ai-agents-process where the renamed claude-process repository is meant可能已有人在做 @ShahadatTest 今天认领。 未关闭good first issue
难度 1/5 1 小时以内 新手友好度 85/100
btclib-org/portanode#821 · 1 条评论 ·
维护者通常 1 天内回复
-
Remove the em dashes from the skill smart-account reference可能已有人在做 @Vamsi-2581 今天认领。 未关闭agent-ready area: docs documentation good first issue
难度 2/5 1-3 小时 新手友好度 74/100
Soneso/stellar-agent-wallet#541 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
flisk-sh/run-my-agents#61 ·