This guide covers running CodePrism using Docker containers. For native installation, see the Getting Started Guide.
- Prerequisites
- Start Qdrant
- Build or Pull CodePrism Image
- Run Initial Indexing
- Start MCP Server
- VS Code Integration
- Docker installed and running
- Your code repository accessible from the host machine
CodePrism requires Qdrant for semantic search:
docker run -d --name qdrant \
-p 6333:6333 -p 6334:6334 \
-v qdrant_storage:/qdrant/storage \
qdrant/qdrant:latestgit clone https://github.com/codeprysm/codeprysm.git
cd codeprysm
docker build -f docker/Dockerfile -t codeprysm:local .Or using just:
just docker-buildAdd .codeprysm/ to your repository's .gitignore:
echo ".codeprysm/" >> /path/to/your/repo/.gitignoreRun the initial indexing:
docker run -it --rm \
--network host \
-v /path/to/your/repo:/data \
codeprysm:local init --root /data --qdrant-url http://localhost:6334This creates a .codeprysm/ directory in your repository containing the code graph and semantic index.
Use glob patterns to exclude specific files or directories:
docker run -it --rm \
--network host \
-v /path/to/your/repo:/data \
codeprysm:local init --root /data --exclude "**/node_modules/**" "**/vendor/**"Files matching .gitignore patterns are automatically excluded.
docker run -it --rm \
--network host \
-v /path/to/your/repo:/data \
codeprysm:local mcp --root /data --qdrant-url http://localhost:6334docker run -d --name codeprysm-mcp \
--network host \
-v /path/to/your/repo:/data \
codeprysm:local mcp --root /data --qdrant-url http://localhost:6334Create .vscode/mcp.json in your repository:
{
"servers": {
"codeprysm": {
"type": "stdio",
"command": "docker",
"args": [
"run", "--rm", "-i",
"--network", "host",
"-v", "${workspaceFolder}:/data",
"codeprysm:local",
"mcp", "--root", "/data", "--qdrant-url", "http://localhost:6334"
]
}
}
}Note for Dev Containers: The ${workspaceFolder} variable may not work correctly in devcontainers. Use the absolute host path to your repository instead.
For a complete setup with Qdrant, create docker-compose.yml:
version: '3.8'
services:
qdrant:
image: qdrant/qdrant:latest
ports:
- "6333:6333"
- "6334:6334"
volumes:
- qdrant_storage:/qdrant/storage
codeprysm:
build:
context: .
dockerfile: docker/Dockerfile
depends_on:
- qdrant
volumes:
- /path/to/your/repo:/data
command: ["mcp", "--root", "/data", "--qdrant-url", "http://qdrant:6334"]
stdin_open: true
tty: true
volumes:
qdrant_storage:Run with:
docker compose up -ddocker ps | grep -E "(qdrant|codeprysm)"docker run --rm \
-v /path/to/your/repo:/data \
codeprysm:local stats --prism-dir /data/.codeprysmdocker run --rm \
--network host \
-v /path/to/your/repo:/data \
codeprysm:local search "authentication handler" --qdrant-url http://localhost:6334If the container can't connect to Qdrant, ensure you're using --network host or that both containers are on the same Docker network.
The CodePrism container runs as a non-root user. Ensure the mounted volume has appropriate permissions:
chmod -R 755 /path/to/your/repoOn macOS and Windows, ensure Docker has access to the directory you're mounting. Check Docker Desktop settings under Resources > File Sharing.