Skip to content

Instantly share code, notes, and snippets.

@costa
Last active March 6, 2026 15:54
Show Gist options
  • Select an option

  • Save costa/d9b64547cc4d94a0c36716e7b3436803 to your computer and use it in GitHub Desktop.

Select an option

Save costa/d9b64547cc4d94a0c36716e7b3436803 to your computer and use it in GitHub Desktop.
Claude.AI (a genAI) "claude-code" docker (restricted) runner script -- to be run in a project root directory
#!/bin/bash -e
cwd="$( pwd )"
test -t 0 && tty_opt=t
docker run --rm -i$tty_opt -v "$HOME/.claude:/root/.claude" -v "$cwd:$cwd" -w "$cwd" node npx -y @anthropic-ai/claude-code
@costa
Copy link
Author

costa commented Feb 10, 2026

$ curl -o /usr/local/bin/claude https://gist.githubusercontent.com/costa/d9b64547cc4d94a0c36716e7b3436803/raw/eddb4409c002bbfaf323c1682a68d14485975336/claude; chmod +x /usr/local/bin/claude

@costa
Copy link
Author

costa commented Mar 6, 2026

consider another option for the command line above:
docker run --rm -i$tty_opt -v "$cwd:$cwd" -w "$cwd" -e "CLAUDE_CONFIG_DIR=$cwd/.claude" node npx -y @anthropic-ai/claude-code "$@"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment