Remove orphaned setup-env.sh script
This script was not referenced anywhere in the codebase and used an outdated approach for credential management. Current workflow bakes credentials into Docker image from .env file in project root.
This commit is contained in:
parent
1b056bdcd3
commit
b7735057b3
@ -1,9 +1,6 @@
|
||||
# Copy this file to .env and fill in your credentials
|
||||
# The .env file will be baked into the Docker image during build
|
||||
|
||||
# Required for Claude Code if not using via subscription.
|
||||
ANTHROPIC_API_KEY=your_anthropic_api_key_here
|
||||
|
||||
# Optional: Twilio credentials for SMS notifications
|
||||
TWILIO_ACCOUNT_SID=your_twilio_account_sid
|
||||
TWILIO_AUTH_TOKEN=your_twilio_auth_token
|
||||
@ -11,7 +8,7 @@ TWILIO_FROM_NUMBER=+1234567890
|
||||
TWILIO_TO_NUMBER=+0987654321
|
||||
|
||||
# Optional: Custom conda installation (for academic/lab environments)
|
||||
# Example: CONDA_PREFIX=/vol/biomedic3/username/miniconda3
|
||||
# Example: CONDA_PREFIX=/path/to/miniconda3
|
||||
CONDA_PREFIX=
|
||||
|
||||
# Optional: Additional conda directories (space-separated list)
|
||||
@ -19,7 +16,7 @@ CONDA_PREFIX=
|
||||
# Automatic detection:
|
||||
# - Paths with "*env*" are added to CONDA_ENVS_DIRS (for environments)
|
||||
# - Paths with "*pkg*" are added to CONDA_PKGS_DIRS (for package cache)
|
||||
# Example: CONDA_EXTRA_DIRS="/vol/biomedic3/username/.conda/envs /vol/biomedic3/username/conda_envs /vol/biomedic3/username/.conda/pkgs /vol/biomedic3/username/conda_pkgs /homes/username/.conda/envs"
|
||||
# Example: CONDA_EXTRA_DIRS="/vol/lab/username/.conda/envs /vol/lab/username/conda_envs /vol/lab/username/.conda/pkgs /vol/lab/username/conda_pkgs"
|
||||
CONDA_EXTRA_DIRS=
|
||||
|
||||
# Optional: System packages to install in Docker container (space-separated)
|
||||
|
@ -1,77 +0,0 @@
|
||||
# Claude Docker Project Scratchpad
|
||||
|
||||
## Project Overview
|
||||
Docker container for Claude Code with full autonomous permissions, authentication persistence, and Twilio SMS notifications.
|
||||
|
||||
## ✅ COMPLETED PHASES
|
||||
|
||||
### Phase 1 - MVP (Complete)
|
||||
- Docker setup with Claude Code + Twilio MCP integration
|
||||
- Wrapper script for easy invocation
|
||||
- Auto .claude directory setup
|
||||
- Full autonomous permissions with --dangerously-skip-permissions
|
||||
- Context persistence via scratchpad.md files
|
||||
|
||||
### Phase 2 - Authentication Persistence (Complete)
|
||||
- **SOLVED**: Authentication files copied during Docker build
|
||||
- **SOLVED**: MCP servers persist with user scope
|
||||
- **SOLVED**: No unnecessary rebuilds
|
||||
- **RESULT**: Zero-friction experience - no login prompts, SMS ready instantly
|
||||
|
||||
## 🎯 CURRENT FOCUS
|
||||
**CRITICAL ISSUE TO RESOLVE NEXT SESSION:**
|
||||
|
||||
### CLAUDE.md Template Not Being Copied to Container
|
||||
**Problem:** The CLAUDE.md template file is not appearing in `~/.claude/CLAUDE.md` inside the container, so Claude doesn't read the project instructions.
|
||||
|
||||
**Root Cause Identified:** In Dockerfile line 65, the cleanup command `rm -rf /tmp/.claude*` is deleting `/tmp/CLAUDE.md` BEFORE it can be copied to the final location.
|
||||
|
||||
**Solution Applied (needs testing):**
|
||||
- Fixed order: copy CLAUDE.md BEFORE cleanup in same RUN block
|
||||
- Line 64: `cp /tmp/CLAUDE.md /home/claude-user/.claude/CLAUDE.md &&`
|
||||
- Line 65: `rm -rf /tmp/.claude* /tmp/CLAUDE.md`
|
||||
|
||||
**Test Command:**
|
||||
```bash
|
||||
docker rmi claude-docker:latest && claude-docker
|
||||
# Then: ls -la ~/.claude/CLAUDE.md
|
||||
```
|
||||
|
||||
**Impact:** Without this file, Claude doesn't know:
|
||||
- How to use conda environments properly
|
||||
- When/how to send SMS notifications
|
||||
- Context persistence guidelines
|
||||
- Available tools and capabilities
|
||||
|
||||
## 📚 KEY INSIGHTS FROM AUTHENTICATION JOURNEY
|
||||
|
||||
### Critical Discovery: ~/.claude.json + MCP Scope
|
||||
- Claude Code requires BOTH `~/.claude.json` (user profile) AND `~/.claude/.credentials.json` (tokens)
|
||||
- MCP servers default to "local" scope (project-specific) - need "user" scope for persistence
|
||||
- Authentication can be baked into Docker image during build
|
||||
- Simple rebuild logic (only if image missing) prevents unnecessary rebuilds
|
||||
|
||||
### Technical Implementation
|
||||
- Copy auth files during Docker build, not runtime mounting
|
||||
- Use `-s user` flag for MCP persistence across sessions
|
||||
- Files placed at correct locations before user switch in Dockerfile
|
||||
|
||||
## 🔮 FUTURE ENHANCEMENTS
|
||||
- Network security with firewall (iptables + ipset)
|
||||
- Shell history persistence between sessions
|
||||
- Git configuration persistence
|
||||
|
||||
## 📋 DECISIONS LOG
|
||||
- MCP integration using user scope for persistence
|
||||
- Authentication files baked into Docker image at build time
|
||||
- Single container approach (no Docker Compose)
|
||||
- Simplified rebuild logic (only when image missing)
|
||||
- SMS via `@yiyang.1i/sms-mcp-server` with Auth Token
|
||||
|
||||
## 🔗 QUICK REFERENCES
|
||||
- **Install:** `./scripts/install.sh`
|
||||
- **Usage:** `claude-docker` (from any project directory)
|
||||
- **Config:** `~/.claude-docker/.env`
|
||||
- **Force rebuild:** `docker rmi claude-docker:latest`
|
||||
- **SMS command:** `twilio__send_text`
|
||||
- **Repository:** https://github.com/VishalJ99/claude-docker
|
@ -1,49 +0,0 @@
|
||||
#!/bin/bash
|
||||
# ABOUTME: Setup script to create ~/.claude-docker/.env with Twilio credentials
|
||||
# ABOUTME: Run this once on your host machine to configure Twilio for all projects
|
||||
|
||||
CLAUDE_DOCKER_DIR="$HOME/.claude-docker"
|
||||
ENV_FILE="$CLAUDE_DOCKER_DIR/.env"
|
||||
|
||||
# Create directory if it doesn't exist
|
||||
mkdir -p "$CLAUDE_DOCKER_DIR"
|
||||
|
||||
# Check if .env already exists
|
||||
if [ -f "$ENV_FILE" ]; then
|
||||
echo "⚠️ $ENV_FILE already exists!"
|
||||
read -p "Do you want to update it? (y/N) " -n 1 -r
|
||||
echo
|
||||
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Setting up Twilio credentials for Claude Docker..."
|
||||
echo "You'll need your Twilio account information."
|
||||
echo
|
||||
|
||||
# Collect Twilio credentials
|
||||
read -p "Enter your Twilio Account SID: " TWILIO_ACCOUNT_SID
|
||||
read -sp "Enter your Twilio Auth Token: " TWILIO_AUTH_TOKEN
|
||||
echo
|
||||
read -p "Enter your Twilio phone number (with country code, e.g., +1234567890): " TWILIO_FROM_NUMBER
|
||||
read -p "Enter the phone number to receive SMS (with country code): " TWILIO_TO_NUMBER
|
||||
|
||||
# Create .env file
|
||||
cat > "$ENV_FILE" << EOF
|
||||
# Twilio credentials for Claude Docker
|
||||
TWILIO_ACCOUNT_SID=$TWILIO_ACCOUNT_SID
|
||||
TWILIO_AUTH_TOKEN=$TWILIO_AUTH_TOKEN
|
||||
TWILIO_FROM_NUMBER=$TWILIO_FROM_NUMBER
|
||||
TWILIO_TO_NUMBER=$TWILIO_TO_NUMBER
|
||||
EOF
|
||||
|
||||
# Set restrictive permissions
|
||||
chmod 600 "$ENV_FILE"
|
||||
|
||||
echo
|
||||
echo "✅ Twilio credentials saved to $ENV_FILE"
|
||||
echo "These credentials will be available to all Claude Docker sessions."
|
||||
echo
|
||||
echo "To test, run claude-docker from any project directory and use:"
|
||||
echo " node /workspace/test-twilio.js"
|
Loading…
Reference in New Issue
Block a user