-
Notifications
You must be signed in to change notification settings - Fork 6.3k
fix(docker): fix bugs and refactor Docker entrypoint script #21364
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
Conversation
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.
Pull request overview
This PR fixes critical bugs in the Docker entrypoint script and refactors group management logic for better maintainability and reliability.
Key Changes:
- Fixes the
--apendtypo (now--append) that prevented users from being added to groups - Corrects group membership detection using exact matching instead of substring matching
- Fixes telemetry disable logic to properly handle
DISABLE_TELEMETRY=0 - Introduces reusable helper functions
is_user_in_group()andadd_user_to_gid()to eliminate code duplication
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
No issues found across 1 file
Co-authored-by: Copilot <[email protected]>
…21364) Co-authored-by: Copilot <[email protected]> (cherry picked from commit 3a3fdab)
Co-authored-by: Copilot <[email protected]> (cherry picked from commit 3a3fdab)
Summary
This PR fixes several bugs in the Docker entrypoint script and refactors group management logic for better maintainability.
--apendtypousermod --apendsilently failed, preventing users from being added to the Proxmox config files groupgrep -q "${DOCKER_USR}"matched substrings, causing false positives (e.g., usernetincorrectly detected as member whennetdatawas in the group)DISABLE_TELEMETRY=0incorrectly disabled telemetry because-n "$VAR"is true for any non-empty string including"0"PGIDandDOCKER_HOSTwere exported even when emptyNETDATA_LISTENER_PORThad no fallback value (now defaults to19999)is_user_in_group()add_user_to_gid()group_gidinstead of mixedgroup_guid/group_gidTest Plan
Additional Information
For users: How does this change affect me?
Summary by cubic
Fixes multiple issues in the Docker entrypoint to make group assignment and telemetry control reliable, and sets a default Netdata listener port. Refactors group management into small helpers to reduce duplication and improve maintainability.
Bug Fixes
Refactors
Written for commit 77344f9. Summary will update automatically on new commits.