Description
docker-entrypoint.sh crashes with 'usermod: UID 0 already exists' when running claude-yolo as root user on host.
Type
Details
Problem: When host user is root (UID=0), docker-entrypoint.sh tries to create claude user with UID=0, but root user already exists with UID=0.
Error:
usermod: UID '0' already exists
Root Cause:
- Host passes CLAUDE_UID=$(id -u) to container
- When host user is root, CLAUDE_UID=0
- Container tries: usermod -u 0 claude
- Fails because root (UID=0) already exists
Solution:
Detect UID=0 case and handle specially - either skip usermod or use fallback UID.
Related Files
- docker-entrypoint.sh (UID/GID setup logic)
- claude.sh (UID/GID detection and passing)
Test Plan
Description
docker-entrypoint.sh crashes with 'usermod: UID 0 already exists' when running claude-yolo as root user on host.
Type
Details
Problem: When host user is root (UID=0), docker-entrypoint.sh tries to create claude user with UID=0, but root user already exists with UID=0.
Error:
usermod: UID '0' already existsRoot Cause:
Solution:
Detect UID=0 case and handle specially - either skip usermod or use fallback UID.
Related Files
Test Plan