docker-compose
Analyze, generate, and optimize Docker Compose files. Detect port conflicts, suggest health checks, optimize layer caching.
/plugin install docker-composedocker-compose
A Docker Compose intelligence plugin for Anvil that analyzes, generates, and optimizes your container orchestration configurations. From detecting port conflicts to generating multi-environment overrides, docker-compose brings AI-assisted container management to your workflow.
What It Does
docker-compose provides full-spectrum Docker Compose tooling:
- Configuration generation: Create docker-compose.yml from project description or existing Dockerfiles
- Port conflict detection: Scans all services for overlapping port bindings and suggests alternatives
- Health check generation: Suggests appropriate health checks based on service type (HTTP, TCP, exec)
- Layer caching optimization: Analyzes Dockerfile COPY/RUN order and recommends cache-optimal reordering
- Secret management: Migrates hardcoded environment variables to Docker secrets or external config
- Network topology analysis: Visualizes service dependencies and network segments
- Resource limit recommendations: Suggests memory and CPU limits based on service type and load profile
- Multi-environment overrides: Generates docker-compose.override.yml and docker-compose.prod.yml variants
- Compose validation: Validates syntax, checks image availability, verifies volume mounts
Installation
anvil plugin install docker-compose
Usage
Analyze Existing Compose File
/compose analyze ./docker-compose.yml
Generate from Description
/compose generate "PostgreSQL 16 + Redis 7 + Node.js API on port 3000 + nginx reverse proxy"
Generate from Dockerfiles in Project
/compose generate --from-dockerfiles
Check for Port Conflicts
/compose check-ports
Add Health Checks to All Services
/compose add-healthchecks ./docker-compose.yml
Optimize Layer Caching
/compose optimize-cache ./Dockerfile
Generate Production Override
/compose override --env production
Configuration Options
| Option | Description | Default |
|---|---|---|
--file | Path to compose file | docker-compose.yml |
--env | Environment profile | development |
--project | Project name | directory name |
--validate | Validate after generation | true |
Requirements
- Docker and Docker Compose v2 installed
- docker-compose.yml in current directory or specified via --file
Reviews
No reviews yet. Be the first!
Related Plugins
datadog-monitor
Query Datadog metrics, create monitors, analyze APM traces. Correlate deployments with metric changes.
gitlab-ci
Generate and manage GitLab CI/CD pipelines. Create .gitlab-ci.yml, trigger pipelines, and analyze job logs.
prometheus-query
Write PromQL queries, create Grafana dashboards, and analyze metrics from Prometheus/Victoria Metrics/Thanos.