Skip to content

fix(Docker): docker build fails when base image has no klogd user#1205

Merged
lklimek merged 1 commit into
v1.6-devfrom
fix/docker-build-no-klogd-anymore
Nov 25, 2025
Merged

fix(Docker): docker build fails when base image has no klogd user#1205
lklimek merged 1 commit into
v1.6-devfrom
fix/docker-build-no-klogd-anymore

Conversation

@lklimek
Copy link
Copy Markdown
Collaborator

@lklimek lklimek commented Nov 13, 2025

Issue being fixed or feature implemented

Alpine base image does not have klogd user anymore, causing build to fail.

What was done?

Improved Dockerfile to delete user with uid 100 only if it exists.

How Has This Been Tested?

GHA https://github.com/dashpay/tenderdash/actions/runs/19336505278

Breaking Changes

None

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

Summary by CodeRabbit

  • Chores
    • Updated Docker image build configuration with improved user and group management strategies for the deployment environment.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Nov 13, 2025

Walkthrough

The Dockerfile has been updated to replace a previous workaround for klogd user deletion with an explicit tmuser creation strategy. The new approach creates a tmuser group with GID 1000 and a tmuser with UID 100, ensuring UID 100 is available by removing any conflicting existing user.

Changes

Cohort / File(s) Summary
Docker user setup
DOCKER/Dockerfile
Removed klogd user deletion workaround; replaced with explicit tmuser group (GID 1000) and tmuser creation (UID 100), including cleanup of conflicting UID 100 users.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Verify the new UID/GID assignment strategy is correct and doesn't introduce conflicts
  • Confirm the deletion of the old klogd workaround is intentional and doesn't break existing functionality
  • Check that the new tmuser setup is compatible with downstream image stages

Poem

🐰 A user once called klogd, now gone with the wind,
In comes tmuser, with UID 100 pinned!
GID 1000, a fresh start so clean,
Docker's best housekeeping I've ever seen! 🎉

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly addresses the primary change: fixing Docker build failures due to the absence of the klogd user in the base image, which is the core issue resolved in this PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/docker-build-no-klogd-anymore

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 875a818 and ff34099.

📒 Files selected for processing (1)
  • DOCKER/Dockerfile (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: e2e-test (rotate)
  • GitHub Check: e2e-test (dashcore)
🔇 Additional comments (1)
DOCKER/Dockerfile (1)

80-89: Verified: deluser command is available and logic is sound.

The deluser command is provided by BusyBox by default in Alpine 3.21, so the conditional deletion on line 88 will work as intended. UID 100 can be occupied by klogd when the sysklogd package is installed in Alpine 3.21, making the defensive approach in your code appropriate.

The error handling with || true correctly handles both cases: when UID 100 exists (and is deleted) and when it doesn't. The user creation sequence—group first (line 87), then conditional deletion (line 88), then user creation (line 89)—is properly ordered and follows Docker best practices.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@lklimek lklimek added this to the v1.6 milestone Nov 13, 2025
@lklimek lklimek merged commit 40eeede into v1.6-dev Nov 25, 2025
17 checks passed
@lklimek lklimek deleted the fix/docker-build-no-klogd-anymore branch November 25, 2025 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant