-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclaude
More file actions
executable file
·31 lines (26 loc) · 904 Bytes
/
claude
File metadata and controls
executable file
·31 lines (26 loc) · 904 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# Launch Claude Code in Docker container
# Mounts current directory as workspace
# Get the directory where this script is located
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Build the latest container
echo "Building claude-code container..."
docker build -t claude-code "$SCRIPT_DIR" || exit 1
# Determine if we're running in an interactive terminal
if [ -t 0 ] && [ -t 1 ]; then
TTY_FLAGS="-it"
else
TTY_FLAGS="-i"
fi
# Run the container
docker run $TTY_FLAGS --rm \
--network host \
--user "$(id -u):$(id -g)" \
-v "$(pwd):/home/claude/workspace" \
-v "$HOME/.ssh:/home/claude/.ssh:ro" \
-v "$SSH_AUTH_SOCK:/ssh-agent" \
-e SSH_AUTH_SOCK=/ssh-agent \
-v "$HOME/.claude:/home/claude/.claude:rw" \
-v "$HOME/.claude.json:/home/claude/.claude.json:rw" \
-v "/tmp:/tmp" \
claude-code claude "--dangerously-skip-permissions"