Overview
Esprit runs security scans inside isolated Docker containers based on Kali Linux. You can customize the base image to include additional tools, configurations, or integrations specific to your environment.Default Image
The official Esprit sandbox image is:containers/Dockerfile
Base Image Architecture
The Esprit sandbox container includes:Core Components
- Base OS: Kali Linux Rolling (latest)
- Python: 3.12+ with Poetry for dependency management
- Security Tools: nmap, sqlmap, nuclei, ffuf, subfinder, httpx, and more
- Browser: Chromium with Playwright for web application testing
- Proxy: Caido for HTTP request/response interception
- Runtime: Tool server for agent communication
User Configuration
- Non-root user:
pentester(UID varies) - Working directory:
/workspace - Home directory:
/home/pentester
Network Capabilities
Building Custom Images
Method 1: Extend the Official Image
Create a customDockerfile:
Method 2: Fork and Modify Base Dockerfile
Clone the Esprit repository and modifycontainers/Dockerfile:
Image Customization Examples
Add Cloud Provider Tools
Add Custom Wordlists
Add Mobile Testing Tools
Add API Testing Tools
Add Custom CA Certificates
Using Custom Images
Set via Environment Variable
Set via Configuration File
~/.esprit/cli-config.json:
Per-Scan Override
Multi-Architecture Support
Build for ARM64 and AMD64
Platform-Specific Optimization
Image Size Optimization
Minimize Layers
Use .dockerignore
Create.dockerignore in your build context:
Multi-Stage Builds
Verification and Testing
Test Custom Image Locally
Test with Esprit
Image Registry Configuration
Private Registry Authentication
Pull Through Cache
Configure Docker daemon (/etc/docker/daemon.json):
CI/CD Integration
Build in GitHub Actions
Automated Security Scanning
Runtime Configuration
The Esprit runtime starts containers with specific configurations. Seeesprit/runtime/docker_runtime.py:161-180:
Custom Environment Variables
You can pass additional environment variables by modifying the runtime configuration or using Docker environment files.Troubleshooting
Image Pull Failures
Container Startup Issues
Tool Server Not Starting
Check the entrypoint script (containers/docker-entrypoint.sh:154-203):
Best Practices
- Version Tags - Always tag images with versions, not just
latest - Minimize Size - Remove unnecessary files and combine RUN commands
- Security Scanning - Scan custom images for vulnerabilities before use
- Reproducible Builds - Pin tool versions in Dockerfile
- Layer Caching - Order Dockerfile commands from least to most frequently changing
- Multi-Arch Support - Build for both ARM64 and AMD64 when possible
- Documentation - Document all custom tools and configurations added
- Testing - Test custom images locally before deploying to CI/CD