Docker setup
Learn how to build, configure, and deploy Jenkins Job Insight using Docker.Building the image
Clone the repository and build the Docker image:- Builder stage: Installs dependencies with
uvpackage manager - Production stage: Copies the virtual environment and installs AI CLI tools (Claude, Gemini, Cursor)
The container runs as a non-root user (
appuser) for security and is compatible with OpenShift’s arbitrary UID requirements.Data directory setup
The/data directory is used for SQLite database persistence. You must create this directory on the host before starting the container:
Running with Docker
Basic usage
Run the container with minimum required configuration:With custom prompt
Mount a custom analysis prompt file to customize AI behavior:Environment variables
Required variables
| Variable | Description | Example |
|---|---|---|
JENKINS_URL | Jenkins server URL | https://jenkins.example.com |
JENKINS_USER | Jenkins username | your-username |
JENKINS_PASSWORD | Jenkins password or API token | your-api-token |
AI_PROVIDER | AI provider: claude, gemini, or cursor | claude |
AI_MODEL | Model for the AI provider | claude-opus-4 |
AI provider authentication
For Gemini OAuth or Cursor web login, use
docker exec <container-name> gemini auth login or docker exec <container-name> agent login after starting the container.Optional variables
| Variable | Default | Description |
|---|---|---|
JENKINS_SSL_VERIFY | true | Enable SSL certificate verification (set to false for self-signed certs) |
AI_CLI_TIMEOUT | 10 | Timeout for AI CLI calls in minutes |
LOG_LEVEL | INFO | Log verbosity: DEBUG, INFO, WARNING, ERROR |
TESTS_REPO_URL | - | Default tests repository URL (can be overridden per-request) |
CALLBACK_URL | - | Default callback URL for results |
CALLBACK_HEADERS | - | Default callback headers as JSON |
PROMPT_FILE | /app/PROMPT.md | Path to custom analysis prompt file |
HTML_REPORT | true | Generate HTML reports |
DEBUG | false | Enable debug mode with hot reload |
Jira integration (optional)
Jira integration searches for existing bugs matching PRODUCT BUG failures. The feature is completely optional and automatically enabled when
JIRA_URL and authentication are configured.Docker Compose
For production deployments, use Docker Compose for easier configuration management.Setup
Create .env file
Copy the example environment file and configure your values:Edit
.env with your Jenkins and AI provider credentials:.env
Custom prompt with Docker Compose
To use a custom analysis prompt:- Create your prompt file (e.g.,
PROMPT.md) - Uncomment the volume mount in
docker-compose.yaml:
- Restart the service:
Vertex AI authentication
For Claude with Vertex AI, mount your gcloud credentials:docker-compose.yaml
.env
SSL certificate verification
For Jenkins servers with self-signed SSL certificates, disable certificate verification:Health checks
The Docker image includes a health check endpoint at/health:
- Interval: 30 seconds
- Timeout: 10 seconds
- Retries: 3
- Start period: 10 seconds
Container management
View logs
Execute commands inside container
Authenticate AI CLI tools
Restart container
Troubleshooting
Permission denied on /data
Create the data directory before starting the container:AI CLI not found
Ensure the CLI tools are in the PATH. Check the Dockerfile installation:SSL certificate errors
Disable SSL verification for Jenkins or Jira:Next steps
Environment variables
Complete reference for all configuration options
API reference
Explore all available endpoints
Custom prompts
Customize AI analysis behavior
Jira integration
Set up Jira bug search