
Docker Development
Turn bloated Dockerfiles and compose files into smaller, faster, production-hardened containers.
Install
npx skills add https://github.com/alirezarezvani/claude-skills --skill docker-developmentWhat is this skill?
- Slash commands: /docker:optimize, /docker:compose, /docker:security
- Multi-stage builds and layer-cache patterns to cut image size and build time
- docker-compose generation with production-minded service topology
- Container security audits covering secrets, attack surface, and misconfigurations
- Concrete Dockerfile rewrite decisions—not a generic Docker tutorial
Adoption & trust: 549 installs on skills.sh; 17.5k GitHub stars; 2/3 security scanners passed (skills.sh audits).
Recommended Skills
Azure Kubernetesmicrosoft/azure-skills
Github Actions Docsxixu-me/skills
Deploy To Vercelvercel-labs/agent-skills
Vercel Cli With Tokensvercel-labs/agent-skills
Turborepovercel/turborepo
Docker Expertsickn33/antigravity-awesome-skills
Journey fit
Primary fit
Container work happens while you are assembling runnable services and local prod-like stacks during product build. Integrations is the shelf for packaging apps with Docker, compose orchestration, and runtime wiring—not one-off frontend styling.
Common Questions / FAQ
Is Docker Development safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Docker Development
# Docker Development > Smaller images. Faster builds. Secure containers. No guesswork. Opinionated Docker workflow that turns bloated Dockerfiles into production-grade containers. Covers optimization, multi-stage builds, compose orchestration, and security hardening. Not a Docker tutorial — a set of concrete decisions about how to build containers that don't waste time, space, or attack surface. --- ## Slash Commands | Command | What it does | |---------|-------------| | `/docker:optimize` | Analyze and optimize a Dockerfile for size, speed, and layer caching | | `/docker:compose` | Generate or improve docker-compose.yml with best practices | | `/docker:security` | Audit a Dockerfile or running container for security issues | --- ## When This Skill Activates Recognize these patterns from the user: - "Optimize this Dockerfile" - "My Docker build is slow" - "Create a docker-compose for this project" - "Is this Dockerfile secure?" - "Reduce my Docker image size" - "Set up multi-stage builds" - "Docker best practices for [language/framework]" - Any request involving: Dockerfile, docker-compose, container, image size, build cache, Docker security If the user has a Dockerfile or wants to containerize something → this skill applies. --- ## Workflow ### `/docker:optimize` — Dockerfile Optimization 1. **Analyze current state** - Read the Dockerfile - Identify base image and its size - Count layers (each RUN/COPY/ADD = 1 layer) - Check for common anti-patterns 2. **Apply optimization checklist** ``` BASE IMAGE ├── Use specific tags, never :latest in production ├── Prefer slim/alpine variants (debian-slim > ubuntu > debian) ├── Pin digest for reproducibility in CI: image@sha256:... └── Match base to runtime needs (don't use python:3.12 for a compiled binary) LAYER OPTIMIZATION ├── Combine related RUN commands with && \ ├── Order layers: least-changing first (deps before source code) ├── Clean package manager cache in the same RUN layer ├── Use .dockerignore to exclude unnecessary files └── Separate build deps from runtime deps BUILD CACHE ├── COPY dependency files before source code (package.json, requirements.txt, go.mod) ├── Install deps in a separate layer from code copy ├── Use BuildKit cache mounts: --mount=type=cache,target=/root/.cache └── Avoid COPY . . before dependency installation MULTI-STAGE BUILDS ├── Stage 1: build (full SDK, build tools, dev deps) ├── Stage 2: runtime (minimal base, only production artifacts) ├── COPY --from=builder only what's needed └── Final image should have NO build tools, NO source code, NO dev deps ``` 3. **Generate optimized Dockerfile** - Apply all relevant optimizations - Add inline comments explaining each decision - Report estimated size reduction 4. **Validate** ```bash python3 scripts/dockerfile_analyzer.py Dockerfile ``` ### `/docker:compose` — Docker Compose Configuration 1. **Identify services** - Application (web, API, worker) - Database (postgres, mysql, redis, mongo) - Cache (redis, memcached) - Queue (rabbitmq, kafka) - Reverse proxy (nginx, traefik, caddy) 2. **Apply compose best practices** ``` SERVICES ├── Use depends_on with condition: service_healthy ├── Add healthchecks for every service ├── Set reso