Metadata-Version: 2.4
Name: docker-opt
Version: 0.1.0
Summary: Python-first Dockerfile optimizer CLI
Author: Your Name
License: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.10
Requires-Dist: typer>=0.12.3
Provides-Extra: dev
Requires-Dist: build>=1.2.1; extra == 'dev'
Requires-Dist: pyinstaller>=6.0.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: twine>=5.0.0; extra == 'dev'
Description-Content-Type: text/markdown

# docker-opt

Python-first Dockerfile optimization advisor for DevOps teams. It analyzes a Dockerfile, flags risks and bloat, outputs JSON for CI, generates an optimized Python template, and suggests a `.dockerignore`.

## Install

```powershell
pip install docker-opt
```

## Windows exe build

```powershell
.\build.ps1
dist\docker-opt.exe --help
```

## Usage

```powershell
# Analyze
python -m docker_opt analyze -f Dockerfile

# JSON output
python -m docker_opt analyze -f Dockerfile --json

# CI: fail on MEDIUM and HIGH findings
python -m docker_opt analyze -f Dockerfile --ci --fail-on MEDIUM

# Generate an optimized template
python -m docker_opt fix -f Dockerfile --stdout

# Suggest .dockerignore
python -m docker_opt dockerignore --type python
```

## Scoring

Each finding includes `severity` and an `impactBand` to help triage (e.g., SECURITY, SIZE, CACHE, REPRODUCIBILITY).

## Roadmap

PR comment bot integration for CI feedback.

## Build & Publish to PyPI

```powershell
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e ".[dev]"
pytest
python -m build
python -m twine check dist\*
```

Publish (TestPyPI by default):

```powershell
setx TWINE_USERNAME "__token__"
setx TWINE_PASSWORD "pypi-***"
.\publish.ps1
```

Publish to PyPI:

```powershell
.\publish.ps1 -Target prod
```
