Setting UID/GID/USER is broken
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- docker
- Lĩnh vực
- infrastructure
Hướng nghiên cứu
Không có tệp repository hoặc test nào được nêu tên. Trước tiên, hãy lần theo các điểm vào khởi động và xử lý quyền của Docker image đối với USER, UID và GID, sau đó tái hiện cấu hình docker-compose được cung cấp. Được xem là hoàn tất khi user đã cấu hình có thể khởi động container và /data và /app sử dụng identity được yêu cầu mà không có lỗi invalid-user hoặc chown.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Shell
- Star
- 345
- Fork
- 25
- Merge trung bình
- 4 giờ 42 phút
- Pull request đã merge (30 ngày)
- 7
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của GameServerManagers/docker-gameserver
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
GameServerManagers/docker-gameserver#144 · 1 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
GameServerManagers/docker-gameserver#142 · 2 bình luận ·
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 48/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
GameServerManagers/docker-gameserver#113 · 1 bình luận ·
Tất cả issue của GameServerManagers/docker-gameserver
Issue tương tự
-
data only (no code) good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày
-
kind/bug needs-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
projectbluefin/common#1521 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
-
GNU nano 9.3 released upstreamĐang mởupstream-release
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
pypa/advisory-database#401 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày