mirror of
https://github.com/KeygraphHQ/shannon.git
synced 2026-02-12 17:22:50 +00:00
fix: resolve Docker build failure and clarify env var configuration
- Remove .env file with incorrect CLAUDE_CODE_MAX_TOKENS variable - Remove .env copy from Dockerfile that was causing build to fail - Update README to distinguish local (export) vs Docker (-e) env var usage - Add CLAUDE_CODE_MAX_OUTPUT_TOKENS to all Docker run examples The correct variable is CLAUDE_CODE_MAX_OUTPUT_TOKENS (not CLAUDE_CODE_MAX_TOKENS) and should be passed at runtime via -e flag for Docker or export for local runs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
5
.env
5
.env
@@ -1,5 +0,0 @@
|
||||
# CLAUDE_CODE_MAX_TOKENS controls the maximum token limit for Claude Code sessions
|
||||
# This is used by the Claude Agent SDK to set the context window size for AI analysis
|
||||
# Higher values allow for more comprehensive code analysis but consume more tokens
|
||||
# Default: 64000 tokens (sufficient for most penetration testing tasks)
|
||||
CLAUDE_CODE_MAX_TOKENS=64000
|
||||
@@ -109,7 +109,6 @@ WORKDIR /app
|
||||
|
||||
# Copy package.json and package-lock.json first for better caching
|
||||
COPY package*.json ./
|
||||
COPY .env ./.env
|
||||
|
||||
# Install Node.js dependencies as root
|
||||
RUN npm ci --only=production && \
|
||||
|
||||
12
README.md
12
README.md
@@ -107,15 +107,19 @@ Shannon is available in two editions:
|
||||
|
||||
You need either a **Claude Code OAuth token** or an **Anthropic API key** to run Shannon. Get your token from the [Anthropic Console](https://console.anthropic.com) and pass it to Docker via the `-e` flag.
|
||||
|
||||
### Environment Configuration (Optional)
|
||||
### Environment Configuration (Recommended)
|
||||
|
||||
To prevent Claude Code from hitting token limits during long report generation, set the max output tokens before running Shannon:
|
||||
To prevent Claude Code from hitting token limits during long report generation, set the max output tokens environment variable:
|
||||
|
||||
**For local runs:**
|
||||
```bash
|
||||
export CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000
|
||||
```
|
||||
|
||||
This is especially useful for extensive penetration testing reports or when analyzing large codebases.
|
||||
**For Docker runs:**
|
||||
```bash
|
||||
-e CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000
|
||||
```
|
||||
|
||||
### Quick Start with Docker
|
||||
|
||||
@@ -164,6 +168,7 @@ docker run --rm -it \
|
||||
--cap-add=NET_RAW \
|
||||
--cap-add=NET_ADMIN \
|
||||
-e CLAUDE_CODE_OAUTH_TOKEN="$CLAUDE_CODE_OAUTH_TOKEN" \
|
||||
-e CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000 \
|
||||
-v "$(pwd)/repos:/app/repos" \
|
||||
-v "$(pwd)/configs:/app/configs" \
|
||||
shannon:latest \
|
||||
@@ -180,6 +185,7 @@ docker run --rm -it \
|
||||
--cap-add=NET_RAW \
|
||||
--cap-add=NET_ADMIN \
|
||||
-e ANTHROPIC_API_KEY="$ANTHROPIC_API_KEY" \
|
||||
-e CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000 \
|
||||
-v "$(pwd)/repos:/app/repos" \
|
||||
-v "$(pwd)/configs:/app/configs" \
|
||||
shannon:latest \
|
||||
|
||||
Reference in New Issue
Block a user