fix(docker): Improve user name detection when tagging clp-package dev image (fixes #1371).#1373
Merged
Merged
Conversation
Contributor
WalkthroughAdjusts the build script’s user resolution order to whoami, then id --user --name, else "unknown", and uses the resolved value in the Docker image tag as dev-${user}-${short_id}. No other logic paths are changed. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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. Comment |
Contributor
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
tools/docker-images/clp-package/build.sh(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). (6)
- GitHub Check: package-image
- GitHub Check: rust-checks (ubuntu-24.04)
- GitHub Check: rust-checks (ubuntu-22.04)
- GitHub Check: rust-checks (macos-15)
- GitHub Check: lint-check (ubuntu-24.04)
- GitHub Check: lint-check (macos-15)
Bill-hbrhbr
approved these changes
Apr 30, 2026
junhaoliao
added a commit
to junhaoliao/clp
that referenced
this pull request
May 17, 2026
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.
Description
This change improves how the username is detected when tagging the clp‑package development Docker image, addressing issue #1371:
userfrom env varUSERwhoamiwhoamibinary missing), runid --user --nameid --userto just get the user ididbinary missing), useunknownas the fallback.Checklist
breaking change.
Validation performed
clp-package:dev-<username>-<hash>by checkingdocker image lsUSERenv var is missing and the username is missing from/etc/passwd, and found the image was tagged withclp-package:dev-<username-id>-<hash>by checkingdocker image ls:docker run -it \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /usr/bin/docker:/usr/bin/docker:ro \ -v /usr/libexec/docker/cli-plugins:/usr/libexec/docker/cli-plugins:ro \ -v /home/$(id -un):/home/$(id -un) \ --user $(id -u):$(getent group docker | cut -d: -f3) \ -e HOME=/home/$(id -u) \ -e TERM=$TERM \ -w /home/$(id -u) \ ghcr.io/y-scope/clp/clp-core-dependencies-x86-ubuntu-jammy:main \ /bin/bash --loginSummary by CodeRabbit