[FR] Support running Docker image as non-root user
Maintainer thường phản hồi trong vòng 2 ngày
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Internal/External
External otherwise. (Midnight)
Area
Other Any other topic (Delegation, Ranking, ...).
Summary
The run-node script unconditionally writes to /usr/local/bin/env, a root-owned path inside the container filesystem, making it impossible to run the container as a non-root user. Additionally, when using the config merge feature, the entrypoint script writes to /opt/cardano/config//, which also fails as non-root.
Steps to reproduce
- Run ghcr.io/intersectmbo/cardano-node:10.5.2 with a non-root security context:
securityContext:
runAsNonRoot: true
runAsUser: 1001
runAsGroup: 1001 - Container crashes with:
/usr/local/bin/run-node: line 91: /usr/local/bin/env: Permission denied - If CARDANO_CONFIG_JSON_MERGE is also set, the entrypoint additionally fails with:
/usr/local/bin/entrypoint: line 31: /opt/cardano/config/preview/config-merged.json: Permission denied
Expected behavior
The container should support running as a non-root user. Generated files should be written to a user-writable location (e.g. /tmp) instead of root-owned paths:
- run-node writeRootEnv() (line 91): write to /tmp/env instead of /usr/local/bin/env
- entrypoint (line 31): write config-merged.json / topology-merged.json to /tmp instead of /opt/cardano/config//
System info (please complete the following information):
- OS Name: Linux (Kubernetes)
- OS Version: Kernel 5.10
- Node version: cardano-node 10.5.2 (ghcr.io/intersectmbo/cardano-node:10.5.2)
- CLI version: N/A
- Ngôn ngữ chính
- Haskell
- Star
- 3.2k
- Fork
- 763
- Merge trung bình
- 2 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 18
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọ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 IntersectMBO/cardano-node
-
Stale
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 75/100
IntersectMBO/cardano-node#6597 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
IntersectMBO/cardano-node#6522 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Remove carriage returns in testnet README.md for better diffsCó thể đã có người làm @palas đã nhận 3 ngày trước. Đang mở
IntersectMBO/cardano-node#6744 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
-
needs triage type: enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
IntersectMBO/cardano-node#6737 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
needs triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 44/100
IntersectMBO/cardano-node#6734 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của IntersectMBO/cardano-node
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
MorphRule, DataizeRule and ContextualizeRule silently accept unknown YAML keys, unlike rewrite `Rule`Có thể đã có người làm @renyamamoto2026-cmyk đã nhận 1 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
objectionary/phino#2107 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
30-minutes algorithm any-language codewars dart easy elixir hackerrank hacktoberfest haskell help wanted interview-prep julia leetcode lua open-source r scala students zig
Độ khó 2/5 Dưới một giờ Mức phù hợp với người mới 88/100
Huerte/algo-solutions-python#124 ·