Fix UID/GID mismatch and SSH key permissions in container
All checks were successful
Build Container / build-container (push) Successful in 3m42s
All checks were successful
Build Container / build-container (push) Successful in 3m42s
- Entrypoint now runs as root to remap the container's claude user UID/GID to match the host user, fixing bind mount permission errors on WSL - SSH keys are mounted read-only to a staging path (/tmp/.host-ssh) and copied to ~/.ssh with correct permissions by the entrypoint - Exec sessions explicitly run as the claude user - Host UID/GID detected automatically and passed as env vars Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -88,7 +88,9 @@ RUN mkdir -p /home/claude/.claude /home/claude/.ssh
|
||||
|
||||
WORKDIR /workspace
|
||||
|
||||
COPY --chown=claude:claude entrypoint.sh /home/claude/entrypoint.sh
|
||||
RUN chmod +x /home/claude/entrypoint.sh
|
||||
# ── Switch back to root for entrypoint (handles UID/GID remapping) ─────────
|
||||
USER root
|
||||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
RUN chmod +x /usr/local/bin/entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/home/claude/entrypoint.sh"]
|
||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
||||
|
||||
Reference in New Issue
Block a user