Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/claude-code/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "claude-code",
"version": "1.1.0",
"version": "1.2.0",
"name": "Claude Code",
"description": "Installs Claude Code, Anthropic's official CLI for Claude. Supports latest and pinned versions. Configuration persists automatically via a Docker volume.",
"documentationURL": "https://docs.anthropic.com/en/docs/claude-code",
Expand Down
11 changes: 11 additions & 0 deletions src/claude-code/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ install -m 0755 "$CLAUDE_BIN" /usr/local/bin/claude

echo "==> Claude Code $(claude --version) installed at $(command -v claude)"

# Install Claude Code for the remote user so the auto-updater finds the
# binary at ~/.local/bin/claude (the native install path it expects).
if [ -n "${_REMOTE_USER:-}" ] && [ "$_REMOTE_USER" != "root" ]; then
echo "==> Installing Claude Code for user ${_REMOTE_USER} (auto-update support)..."
if [ "$VERSION" = "latest" ]; then
su - "$_REMOTE_USER" -c "curl -fsSL https://claude.ai/install.sh | bash"
else
su - "$_REMOTE_USER" -c "curl -fsSL https://claude.ai/install.sh | bash -s -- '$VERSION'"
fi
fi

# Pre-create the volume mount point with correct ownership so that Docker
# named volumes inherit the ownership on first use (no sudo needed later).
if [ -n "${_REMOTE_USER:-}" ]; then
Expand Down
10 changes: 10 additions & 0 deletions src/claude-code/link-claude-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,13 @@ fi
touch "$config_file"
echo "claude-config: $target_file -> $config_file" >&2
ln -snf "$config_file" "$target_file"

# Ensure ~/.local/bin is in PATH for non-login shells (auto-update support)
local_bin="$home_dir/.local/bin"
if [ -d "$local_bin" ]; then
profile_file="$home_dir/.profile"
if ! grep -q '.local/bin' "$profile_file" 2>/dev/null; then
echo 'export PATH="$HOME/.local/bin:$PATH"' >> "$profile_file"
echo "claude-config: added $local_bin to PATH via $profile_file" >&2
fi
fi
Loading