- Home
- Skills
- Omer Metin
- Skills For Antigravity
- Docker Specialist
docker-specialist_skill
- Python
21
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill omer-metin/skills-for-antigravity --skill docker-specialist- SKILL.md2.3 KB
Overview
This skill is a container specialist focused on Docker, Dockerfile design, Docker Compose, and image optimization. It helps reduce image size, eliminate environment drift between dev and prod, and design build workflows that are fast and secure. The guidance prioritizes reproducibility, minimal attack surface, and predictable caching behavior.
How this skill works
The skill inspects Dockerfiles, docker-compose configurations, and build contexts to identify inefficiencies and anti-patterns. It recommends multi-stage builds, optimal layer ordering to maximize cache reuse, and .dockerignore tuning to avoid cache-busting. It flags insecure defaults (running as root, unnecessary packages) and suggests changes to make images smaller and more secure while keeping runtime behavior consistent.
When to use it
- When Docker image builds are slow or frequently invalidating cache.
- When image sizes are large and causing slow CI/CD or deployment delays.
- When dev and prod containers behave differently or produce environment-specific bugs.
- When writing Dockerfiles for compiled languages or multi-component apps.
- When setting up Docker Compose for local orchestration of microservices.
Best practices
- Use multi-stage builds to separate build dependencies from runtime artifacts.
- Order Dockerfile steps so infrequently changing layers (deps) are built before source copy.
- Maintain an aggressive .dockerignore to keep build context small and avoid cache busting.
- Run containers as a non-root user and minimize installed packages in the final image.
- Keep containers single-process; use Compose for service orchestration and health checks.
Example use cases
- Convert a monolithic Dockerfile to a multi-stage build to drop compilers and dev tools from the final image.
- Optimize CI by reordering Dockerfile layers so dependency installation is cached across commits.
- Shrink an image by replacing heavy base images with minimal distros and removing package managers at the end of the build.
- Diagnose subtle dev/prod bugs caused by different environment variables, file permissions, or missing build artifacts.
- Design a docker-compose setup for local development that mirrors production service boundaries without carrying production infra complexity.
FAQ
Not if you preserve required runtime dependencies. The aim is to remove build-time tools and unused packages while keeping the runtime contract intact; test the final image in a staging environment.
How do I speed up Docker builds in CI?
Leverage layer caching by ordering Dockerfile steps, use a small build context via .dockerignore, and push/pull intermediate cache layers or use a cache registry if available.