Initial commit: Claude Dev Container with Java multi-version, Docker CLI, and web terminal

This commit is contained in:
openclaw
2026-02-24 16:58:17 +00:00
commit a84835cd7e
10 changed files with 732 additions and 0 deletions

47
entrypoint.sh Normal file
View File

@@ -0,0 +1,47 @@
#!/bin/bash
# Source SDKMAN for Java commands
source "$SDKMAN_DIR/bin/sdkman-init.sh"
# Display startup info
echo "==================================="
echo "Claude Dev Container Starting..."
echo "==================================="
echo "Available Java versions:"
sdk list java | grep installed
echo ""
echo "Current Java version:"
java -version
echo ""
echo "Claude Code CLI: $(claude --version 2>/dev/null || echo 'installed')"
echo ""
echo "==================================="
echo "Services:"
echo " - Web terminal: http://localhost:7681"
echo "==================================="
echo ""
echo "Quick start:"
echo " claude chat # Start interactive chat"
echo " claude 'your prompt' # One-shot command"
echo " sdk list java # Show Java versions"
echo " sdk use java 17 # Switch Java version"
echo " docker ps # Docker commands work!"
echo ""
echo "==================================="
# Get credentials from environment variables or use defaults
TERMINAL_USER=${TERMINAL_USER:-developer}
TERMINAL_PASSWORD=${TERMINAL_PASSWORD:-changeme}
# Check if Claude credentials exist
if [ -f "$HOME/.claude/session.json" ]; then
echo "✅ Claude Code credentials found - ready to use!"
else
echo "⚠️ No Claude credentials found"
echo " Copy ~/.claude from your Mac to ./claude-credentials/"
fi
echo ""
# Start ttyd with basic auth
echo "Starting web terminal on port 7681..."
exec ttyd -p 7681 -c $TERMINAL_USER:$TERMINAL_PASSWORD bash