Skip to content

iamPulakesh/DockerBrain

Repository files navigation

DockerBrain

An intelligent terminal dashboard for Docker monitoring, automated debugging, and optimization.

PyPI Downloads Python 3.10+ License: Apache 2.0 PyPI

DockerBrain monitors your Docker containers in real time, detects resource issues, and uses LLMs to generate actionable optimizations for running containers and Dockerfiles.


Features

Feature Command LLM Required
Real-time container monitoring dockerb monitor No
AI optimization suggestions dockerb suggest Yes
Auto-fix containers & Dockerfiles dockerb fix Yes
AI Dockerfile generation from project dockerb dockerize Yes
Curated Dockerfile templates dockerb template No
Environment & config diagnostics dockerb env No

Usage

DockerBrain exposes all functionality through the dockerb CLI. Run the following to see all available commands and options:

dockerb --help

Each command also has its own help page, for example dockerb suggest --help, dockerb fix --help, etc.


Installation

Requirements: Python 3.10+ and a running Docker daemon.

Recommended:

uv tool install dockerbrain

Or with pip:

pip install dockerbrain

Verify:

dockerb --version

Configure an LLM Provider

dockerb init

This creates .dockerbrainrc in ~/.dockerbrain/. Open it with dockerb config and set your key:

[llm]
provider = "choose_provider"
model    = "choose_model"
api_key  = "your_key_here"
Provider API Key Link
Gemini Required aistudio.google.com
ChatGPT Required platform.openai.com
Claude Required console.anthropic.com
Groq Required console.groq.com/keys
Ollama Not Required ollama.com

monitor, template, and env commands work without an API key.


Pre-commit Hook

DockerBrain can run as a pre-commit hook to lint Dockerfiles on every commit:

# .pre-commit-config.yaml 
repos:
  - repo: https://github.com/iamPulakesh/DockerBrain
    rev: v1.0
    hooks:
      - id: dockerbrain-fix

Development

git clone https://github.com/iamPulakesh/DockerBrain.git
cd DockerBrain
pip install -e ".[dev]"

make test                              
make lint                              
make clean                    

See Changelog.md for the full release history.


Contributing

  1. Fork the repository
  2. Contribute
  3. Open a Pull Request

License

Apache-2.0 — see LICENSE for details.

About

Intelligent container optimization for leaner & smarter deployments.

Resources

License

Stars

Watchers

Forks

Contributors