fix(docker): fix bugs and refactor Docker entrypoint script#21364
Merged
ilyam8 merged 2 commits intonetdata:masterfrom Nov 28, 2025
Merged
fix(docker): fix bugs and refactor Docker entrypoint script#21364ilyam8 merged 2 commits intonetdata:masterfrom
ilyam8 merged 2 commits intonetdata:masterfrom
Conversation
Contributor
There was a problem hiding this comment.
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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
stelfrag
approved these changes
Nov 28, 2025
Merged
Ferroin
pushed a commit
that referenced
this pull request
Dec 3, 2025
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> (cherry picked from commit 3a3fdab)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.