containerization-assistant
npx machina-cli add skill a5c-ai/babysitter/containerization-assistant --openclawContainerization Assistant Skill
Assists in containerizing applications by generating Dockerfiles, optimizing images, and configuring container deployments.
Purpose
Enable application containerization for:
- Dockerfile generation
- Multi-stage build optimization
- Base image selection
- Dependency packaging
- Security scanning
Capabilities
1. Dockerfile Generation
- Generate from application analysis
- Support multiple languages
- Include best practices
- Handle build dependencies
2. Multi-Stage Build Optimization
- Separate build and runtime
- Minimize image size
- Cache build layers
- Optimize build time
3. Base Image Selection
- Recommend appropriate base images
- Balance size vs features
- Consider security updates
- Handle distroless options
4. Dependency Packaging
- Bundle application dependencies
- Handle native extensions
- Configure build tools
- Manage versions
5. Health Check Configuration
- Add health checks
- Configure readiness probes
- Set up liveness probes
- Define startup probes
6. Security Scanning
- Scan for vulnerabilities
- Check base image security
- Identify exposed secrets
- Review permissions
Tool Integrations
| Tool | Purpose | Integration Method |
|---|---|---|
| Docker | Container runtime | CLI |
| Buildpacks | Auto-detection | CLI |
| Jib | Java containers | CLI |
| ko | Go containers | CLI |
| Dive | Image analysis | CLI |
| Trivy | Security scanning | CLI |
Output Schema
{
"containerizationId": "string",
"timestamp": "ISO8601",
"application": {
"name": "string",
"language": "string",
"framework": "string"
},
"artifacts": {
"dockerfile": "string",
"dockerignore": "string",
"composeFile": "string"
},
"image": {
"baseImage": "string",
"estimatedSize": "string",
"stages": "number"
},
"security": {
"vulnerabilities": [],
"recommendations": []
}
}
Integration with Migration Processes
- containerization: Primary containerization tool
- cloud-migration: Container deployment
- monolith-to-microservices: Service extraction
Related Skills
iac-generator: Kubernetes IaCcloud-readiness-assessor: Container readiness
Related Agents
cloud-migration-engineer: Container deploymentinfrastructure-migration-agent: Container infrastructure
Source
git clone https://github.com/a5c-ai/babysitter/blob/main/plugins/babysitter/skills/babysit/process/specializations/code-migration-modernization/skills/containerization-assistant/SKILL.mdView on GitHub Overview
Containerization Assistant helps you containerize applications by generating Dockerfiles, optimizing multi-stage builds, selecting base images, packaging dependencies, and enabling security scans. This streamlines deployments, reduces image sizes, and improves security.
How This Skill Works
The skill analyzes the target application to generate language-aware Dockerfiles with best practices, supports multiple languages, and configures multi-stage builds. It also sets up health checks, readiness, liveness, and startup probes, and integrates security scanning with tools like Trivy and optional deployment aids.
When to Use It
- You need a reproducible Dockerfile for a new project
- You want to reduce image size using multi-stage builds
- You must select a secure base image and perform vulnerability checks
- You need to package dependencies, including native extensions
- You require health checks and proper probes for reliable deployments
Quick Start
- Step 1: Provide project details (language, framework, build steps) to analyze the app
- Step 2: Generate Dockerfile, .dockerignore, and initial health checks using best practices
- Step 3: Build and run the image, then run security scans and iterate on optimizations
Best Practices
- Use multi-stage builds to separate build and runtime environments and minimize final image size
- Choose the smallest compatible base image (consider distroless when appropriate)
- Pin dependency versions and leverage build layer caching for faster rebuilds
- Add health checks and ensure readiness, liveness, and startup probes are defined
- Run security scans on base images and dependencies, and restrict container permissions
Example Use Cases
- Node.js web app: generate a multi-stage Dockerfile, install dependencies securely, and set HEALTHCHECK with a minimal final image
- Go microservice: build in a builder stage, use a distroless final image, and enable quick startup
- Java application: containerize with Jib integration to optimize layering and caching
- Python data-processing app: bundle dependencies, configure .dockerignore, and enable security scanning
- Monolith-to-microservices: extract services with per-service Dockerfiles and apply image-size optimizations