diff --git a/homeadditions/.bashrc.d/claude-code.sh b/homeadditions/.bashrc.d/claude-code.sh new file mode 100644 index 0000000..666330d --- /dev/null +++ b/homeadditions/.bashrc.d/claude-code.sh @@ -0,0 +1,3 @@ +# ddev-generated +# claude-code native installer's installation directory is not user-configurable, so add it to PATH. +export PATH="$HOME/.local/bin:$PATH" diff --git a/install.yaml b/install.yaml index be19e3c..3b3eb69 100644 --- a/install.yaml +++ b/install.yaml @@ -13,3 +13,4 @@ project_files: - config.claude-code.yaml - claude-code/.claude.json - claude-code/.gitignore + - homeadditions/.bashrc.d/claude-code.sh diff --git a/web-build/Dockerfile.claude-code b/web-build/Dockerfile.claude-code index 92993fc..80764f1 100644 --- a/web-build/Dockerfile.claude-code +++ b/web-build/Dockerfile.claude-code @@ -1,5 +1,11 @@ #ddev-generated -RUN npm install -g @anthropic-ai/claude-code +# Use the native installer for Claude Code. +# Claude Code needs to be installed to the user's local/bin, not root's. +USER $username +RUN curl -fsSL https://claude.ai/install.sh | bash -RUN curl -sSL "https://raw.githubusercontent.com/upciti/wakemeops/main/assets/install_repository" | bash && apt install -y glab \ No newline at end of file +# Install GitLab support as root. +USER root +RUN apt-get update +RUN curl -sSL "https://raw.githubusercontent.com/upciti/wakemeops/main/assets/install_repository" | bash && apt install -y glab