[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74XN0XRCTEPAFF8ES9475ST":3,"skill-same:01M74XN0XRCTEPAFF8ES9475ST":49},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":29,"commitSha":30,"skillDirectory":5,"forksCount":14,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":33,"ownerDescription":6,"updatedAt":34,"install":35,"resources":48},"01M74XN0XRCTEPAFF8ES9475ST","docker-development",null,"Docker and container development agent skill and plugin for Dockerfile optimization, docker-compose orchestration, multi-stage builds, and container security hardening. Use when: user wants to optimize a Dockerfile, create or improve docker-compose configurations, implement multi-stage builds, audit container security, reduce image size, or follow container best practices. Covers build performance, layer caching, secret management, and production-ready container patterns.","SamuelChien\u002Fmega-skills-collection","SamuelChien","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F4652114?v=4","01M74KK34WVHA0P5ZYSJRDDFMG","Samuel Chien","01M74KK35FQN1N9VZ9EPTH3P2S",0,"MIT","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fdocker-development\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: \"docker-development\"\ndescription: \"Docker and container development agent skill and plugin for Dockerfile optimization, docker-compose orchestration, multi-stage builds, and container security hardening. Use when: user wants to optimize a Dockerfile, create or improve docker-compose configurations, implement multi-stage builds, audit container security, reduce image size, or follow container best practices. Covers build performance, layer caching, secret management, and production-ready container patterns.\"\nlicense: MIT\nmetadata:\n  version: 1.0.0\n  author: Alireza Rezvani\n  category: engineering\n  updated: 2026-03-16\n---\n\n# Docker Development\n\n> Smaller images. Faster builds. Secure containers. No guesswork.\n\nOpinionated Docker workflow that turns bloated Dockerfiles into production-grade containers. Covers optimization, multi-stage builds, compose orchestration, and security hardening.\n\nNot a Docker tutorial — a set of concrete decisions about how to build containers that don't waste time, space, or attack surface.\n\n---\n\n## Slash Commands\n\n| Command | What it does |\n|---------|-------------|\n| `\u002Fdocker:optimize` | Analyze and optimize a Dockerfile for size, speed, and layer caching |\n| `\u002Fdocker:compose` | Generate or improve docker-compose.yml with best practices |\n| `\u002Fdocker:security` | Audit a Dockerfile or running container for security issues |\n\n---\n\n## When This Skill Activates\n\nRecognize these patterns from the user:\n\n- \"Optimize this Dockerfile\"\n- \"My Docker build is slow\"\n- \"Create a docker-compose for this project\"\n- \"Is this Dockerfile secure?\"\n- \"Reduce my Docker image size\"\n- \"Set up multi-stage builds\"\n- \"Docker best practices for [language\u002Fframework]\"\n- Any request involving: Dockerfile, docker-compose, container, image size, build cache, Docker security\n\nIf the user has a Dockerfile or wants to containerize something → this skill applies.\n\n---\n\n## Workflow\n\n### `\u002Fdocker:optimize` — Dockerfile Optimization\n\n1. **Analyze current state**\n   - Read the Dockerfile\n   - Identify base image and its size\n   - Count layers (each RUN\u002FCOPY\u002FADD = 1 layer)\n   - Check for common anti-patterns\n\n2. **Apply optimization checklist**\n\n   ```\n   BASE IMAGE\n   ├── Use specific tags, never :latest in production\n   ├── Prefer slim\u002Falpine variants (debian-slim > ubuntu > debian)\n   ├── Pin digest for reproducibility in CI: image@sha256:...\n   └── Match base to runtime needs (don't use python:3.12 for a compiled binary)\n\n   LAYER OPTIMIZATION\n   ├── Combine related RUN commands with && \\\n   ├── Order layers: least-changing first (deps before source code)\n   ├── Clean package manager cache in the same RUN layer\n   ├── Use .dockerignore to exclude unnecessary files\n   └── Separate build deps from runtime deps\n\n   BUILD CACHE\n   ├── COPY dependency files before source code (package.json, requirements.txt, go.mod)\n   ├── Install deps in a separate layer from code copy\n   ├── Use BuildKit cache mounts: --mount=type=cache,target=\u002Froot\u002F.cache\n   └── Avoid COPY . . before dependency installation\n\n   MULTI-STAGE BUILDS\n   ├── Stage 1: build (full SDK, build tools, dev deps)\n   ├── Stage 2: runtime (minimal base, only production artifacts)\n   ├── COPY --from=builder only what's needed\n   └── Final image should have NO build tools, NO source code, NO dev deps\n   ```\n\n3. **Generate optimized Dockerfile**\n   - Apply all relevant optimizations\n   - Add inline comments explaining each decision\n   - Report estimated size reduction\n\n4. **Validate**\n   ```bash\n   python3 scripts\u002Fdockerfile_analyzer.py Dockerfile\n   ```\n\n### `\u002Fdocker:compose` — Docker Compose Configuration\n\n1. **Identify services**\n   - Application (web, API, worker)\n   - Database (postgres, mysql, redis, mongo)\n   - Cache (redis, memcached)\n   - Queue (rabbitmq, kafka)\n   - Reverse proxy (nginx, traefik, caddy)\n\n2. **Apply compose best practices**\n\n   ```\n   SERVICES\n   ├── Use depends_on with condition: service_healthy\n   ├── Add healthchecks for every service\n   ├── Set resource limits (mem_limit, cpus)\n   ├── Use named volumes for persistent data\n   └── Pin image versions\n\n   NETWORKING\n   ├── Create explicit networks (don't rely on default)\n   ├── Separate frontend and backend networks\n   ├── Only expose ports that need external access\n   └── Use internal: true for backend-only networks\n\n   ENVIRONMENT\n   ├── Use env_file for secrets, not inline environment\n   ├── Never commit .env files (add to .gitignore)\n   ├── Use variable substitution: ${VAR:-default}\n   └── Document all required env vars\n\n   DEVELOPMENT vs PRODUCTION\n   ├── Use compose profiles or override files\n   ├── Dev: bind mounts for hot reload, debug ports exposed\n   ├── Prod: named volumes, no debug ports, restart: unless-stopped\n   └── docker-compose.override.yml for dev-only config\n   ```\n\n3. **Generate compose file**\n   - Output docker-compose.yml with healthchecks, networks, volumes\n   - Generate .env.example with all required variables documented\n   - Add dev\u002Fprod profile annotations\n\n### `\u002Fdocker:security` — Container Security Audit\n\n1. **Dockerfile audit**\n\n   | Check | Severity | Fix |\n   |-------|----------|-----|\n   | Running as root | Critical | Add `USER nonroot` after creating user |\n   | Using :latest tag | High | Pin to specific version |\n   | Secrets in ENV\u002FARG | Critical | Use BuildKit secrets: `--mount=type=secret` |\n   | COPY with broad glob | Medium | Use specific paths, add .dockerignore |\n   | Unnecessary EXPOSE | Low | Only expose ports the app uses |\n   | No HEALTHCHECK | Medium | Add HEALTHCHECK with appropriate interval |\n   | Privileged instructions | High | Avoid `--privileged`, drop capabilities |\n   | Package manager cache retained | Low | Clean in same RUN layer |\n\n2. **Runtime security checks**\n\n   | Check | Severity | Fix |\n   |-------|----------|-----|\n   | Container running as root | Critical | Set user in Dockerfile or compose |\n   | Writable root filesystem | Medium | Use `read_only: true` in compose |\n   | All capabilities retained | High | Drop all, add only needed: `cap_drop: [ALL]` |\n   | No resource limits | Medium | Set `mem_limit` and `cpus` |\n   | Host network mode | High | Use bridge or custom network |\n   | Sensitive mounts | Critical | Never mount \u002Fetc, \u002Fvar\u002Frun\u002Fdocker.sock in prod |\n   | No log driver configured | Low | Set `logging:` with size limits |\n\n3. **Generate security report**\n   ```\n   SECURITY AUDIT — [Dockerfile\u002FImage name]\n   Date: [timestamp]\n\n   CRITICAL: [count]\n   HIGH:     [count]\n   MEDIUM:   [count]\n   LOW:      [count]\n\n   [Detailed findings with fix recommendations]\n   ```\n\n---\n\n## Tooling\n\n### `scripts\u002Fdockerfile_analyzer.py`\n\nCLI utility for static analysis of Dockerfiles.\n\n**Features:**\n- Layer count and optimization suggestions\n- Base image analysis with size estimates\n- Anti-pattern detection (15+ rules)\n- Security issue flagging\n- Multi-stage build detection and validation\n- JSON and text output\n\n**Usage:**\n```bash\n# Analyze a Dockerfile\npython3 scripts\u002Fdockerfile_analyzer.py Dockerfile\n\n# JSON output\npython3 scripts\u002Fdockerfile_analyzer.py Dockerfile --output json\n\n# Analyze with security focus\npython3 scripts\u002Fdockerfile_analyzer.py Dockerfile --security\n\n# Check a specific directory\npython3 scripts\u002Fdockerfile_analyzer.py path\u002Fto\u002FDockerfile\n```\n\n### `scripts\u002Fcompose_validator.py`\n\nCLI utility for validating docker-compose files.\n\n**Features:**\n- Service dependency validation\n- Healthcheck presence detection\n- Network configuration analysis\n- Volume mount validation\n- Environment variable audit\n- Port conflict detection\n- Best practice scoring\n\n**Usage:**\n```bash\n# Validate a compose file\npython3 scripts\u002Fcompose_validator.py docker-compose.yml\n\n# JSON output\npython3 scripts\u002Fcompose_validator.py docker-compose.yml --output json\n\n# Strict mode (fail on warnings)\npython3 scripts\u002Fcompose_validator.py docker-compose.yml --strict\n```\n\n---\n\n## Multi-Stage Build Patterns\n\n### Pattern 1: Compiled Language (Go, Rust, C++)\n\n```dockerfile\n# Build stage\nFROM golang:1.22-alpine AS builder\nWORKDIR \u002Fapp\nCOPY go.mod go.sum .\u002F\nRUN go mod download\nCOPY . .\nRUN CGO_ENABLED=0 go build -ldflags=\"-s -w\" -o \u002Fapp\u002Fserver .\u002Fcmd\u002Fserver\n\n# Runtime stage\nFROM gcr.io\u002Fdistroless\u002Fstatic-debian12\nCOPY --from=builder \u002Fapp\u002Fserver \u002Fserver\nUSER nonroot:nonroot\nENTRYPOINT [\"\u002Fserver\"]\n```\n\n### Pattern 2: Node.js \u002F TypeScript\n\n```dockerfile\n# Dependencies stage\nFROM node:20-alpine AS deps\nWORKDIR \u002Fapp\nCOPY package.json package-lock.json .\u002F\nRUN npm ci --production=false\n\n# Build stage\nFROM deps AS builder\nCOPY . .\nRUN npm run build\n\n# Runtime stage\nFROM node:20-alpine\nWORKDIR \u002Fapp\nRUN addgroup -g 1001 -S appgroup && adduser -S appuser -u 1001\nCOPY --from=builder \u002Fapp\u002Fdist .\u002Fdist\nCOPY --from=deps \u002Fapp\u002Fnode_modules .\u002Fnode_modules\nCOPY package.json .\u002F\nUSER appuser\nEXPOSE 3000\nCMD [\"node\", \"dist\u002Findex.js\"]\n```\n\n### Pattern 3: Python\n\n```dockerfile\n# Build stage\nFROM python:3.12-slim AS builder\nWORKDIR \u002Fapp\nCOPY requirements.txt .\nRUN pip install --no-cache-dir --prefix=\u002Finstall -r requirements.txt\n\n# Runtime stage\nFROM python:3.12-slim\nWORKDIR \u002Fapp\nRUN groupadd -r appgroup && useradd -r -g appgroup appuser\nCOPY --from=builder \u002Finstall \u002Fusr\u002Flocal\nCOPY . .\nUSER appuser\nEXPOSE 8000\nCMD [\"python\", \"-m\", \"uvicorn\", \"main:app\", \"--host\", \"0.0.0.0\", \"--port\", \"8000\"]\n```\n\n---\n\n## Base Image Decision Tree\n\n```\nIs it a compiled binary (Go, Rust, C)?\n├── Yes → distroless\u002Fstatic or scratch\n└── No\n    ├── Need a shell for debugging?\n    │   ├── Yes → alpine variant (e.g., node:20-alpine)\n    │   └── No → distroless variant\n    ├── Need glibc (not musl)?\n    │   ├── Yes → slim variant (e.g., python:3.12-slim)\n    │   └── No → alpine variant\n    └── Need specific OS packages?\n        ├── Many → debian-slim\n        └── Few → alpine + apk add\n```\n\n---\n\n## Proactive Triggers\n\nFlag these without being asked:\n\n- **Dockerfile uses :latest** → Suggest pinning to a specific version tag.\n- **No .dockerignore** → Create one. At minimum: `.git`, `node_modules`, `__pycache__`, `.env`.\n- **COPY . . before dependency install** → Cache bust. Reorder to install deps first.\n- **Running as root** → Add USER instruction. No exceptions for production.\n- **Secrets in ENV or ARG** → Use BuildKit secret mounts. Never bake secrets into layers.\n- **Image over 1GB** → Multi-stage build required. No reason for a production image this large.\n- **No healthcheck** → Add one. Orchestrators (Compose, K8s) need it for proper lifecycle management.\n- **apt-get without cleanup in same layer** → `rm -rf \u002Fvar\u002Flib\u002Fapt\u002Flists\u002F*` in the same RUN.\n\n---\n\n## Installation\n\n### One-liner (any tool)\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Falirezarezvani\u002Fclaude-skills.git\ncp -r claude-skills\u002Fengineering\u002Fdocker-development ~\u002F.claude\u002Fskills\u002F\n```\n\n### Multi-tool install\n```bash\n.\u002Fscripts\u002Fconvert.sh --skill docker-development --tool codex|gemini|cursor|windsurf|openclaw\n```\n\n### OpenClaw\n```bash\nclawhub install cs-docker-development\n```\n\n---\n\n## Related Skills\n\n- **senior-devops** — Broader DevOps scope (CI\u002FCD, IaC, monitoring). Complementary — use docker-development for container-specific work, senior-devops for pipeline and infrastructure.\n- **senior-security** — Application security. Complementary — docker-development covers container security, senior-security covers application-level threats.\n- **autoresearch-agent** — Can optimize Docker build times or image sizes as measurable experiments.\n- **ci-cd-pipeline-builder** — Pipeline construction. Complementary — docker-development builds the containers, ci-cd-pipeline-builder deploys them.\n","# Docker Development\n\n> Smaller images. Faster builds. Secure containers. No guesswork.\n\nOpinionated Docker workflow that turns bloated Dockerfiles into production-grade containers. Covers optimization, multi-stage builds, compose orchestration, and security hardening.\n\nNot a Docker tutorial — a set of concrete decisions about how to build containers that don't waste time, space, or attack surface.\n\n---\n\n## Slash Commands\n\n| Command | What it does |\n|---------|-------------|\n| `\u002Fdocker:optimize` | Analyze and optimize a Dockerfile for size, speed, and layer caching |\n| `\u002Fdocker:compose` | Generate or improve docker-compose.yml with best practices |\n| `\u002Fdocker:security` | Audit a Dockerfile or running container for security issues |\n\n---\n\n## When This Skill Activates\n\nRecognize these patterns from the user:\n\n- \"Optimize this Dockerfile\"\n- \"My Docker build is slow\"\n- \"Create a docker-compose for this project\"\n- \"Is this Dockerfile secure?\"\n- \"Reduce my Docker image size\"\n- \"Set up multi-stage builds\"\n- \"Docker best practices for [language\u002Fframework]\"\n- Any request involving: Dockerfile, docker-compose, container, image size, build cache, Docker security\n\nIf the user has a Dockerfile or wants to containerize something → this skill applies.\n\n---\n\n## Workflow\n\n### `\u002Fdocker:optimize` — Dockerfile Optimization\n\n1. **Analyze current state**\n   - Read the Dockerfile\n   - Identify base image and its size\n   - Count layers (each RUN\u002FCOPY\u002FADD = 1 layer)\n   - Check for common anti-patterns\n\n2. **Apply optimization checklist**\n\n   ```\n   BASE IMAGE\n   ├── Use specific tags, never :latest in production\n   ├── Prefer slim\u002Falpine variants (debian-slim > ubuntu > debian)\n   ├── Pin digest for reproducibility in CI: image@sha256:...\n   └── Match base to runtime needs (don't use python:3.12 for a compiled binary)\n\n   LAYER OPTIMIZATION\n   ├── Combine related RUN commands with && \\\n   ├── Order layers: least-changing first (deps before source code)\n   ├── Clean package manager cache in the same RUN layer\n   ├── Use .dockerignore to exclude unnecessary files\n   └── Separate build deps from runtime deps\n\n   BUILD CACHE\n   ├── COPY dependency files before source code (package.json, requirements.txt, go.mod)\n   ├── Install deps in a separate layer from code copy\n   ├── Use BuildKit cache mounts: --mount=type=cache,target=\u002Froot\u002F.cache\n   └── Avoid COPY . . before dependency installation\n\n   MULTI-STAGE BUILDS\n   ├── Stage 1: build (full SDK, build tools, dev deps)\n   ├── Stage 2: runtime (minimal base, only production artifacts)\n   ├── COPY --from=builder only what's needed\n   └── Final image should have NO build tools, NO source code, NO dev deps\n   ```\n\n3. **Generate optimized Dockerfile**\n   - Apply all relevant optimizations\n   - Add inline comments explaining each decision\n   - Report estimated size reduction\n\n4. **Validate**\n   ```bash\n   python3 scripts\u002Fdockerfile_analyzer.py Dockerfile\n   ```\n\n### `\u002Fdocker:compose` — Docker Compose Configuration\n\n1. **Identify services**\n   - Application (web, API, worker)\n   - Database (postgres, mysql, redis, mongo)\n   - Cache (redis, memcached)\n   - Queue (rabbitmq, kafka)\n   - Reverse proxy (nginx, traefik, caddy)\n\n2. **Apply compose best practices**\n\n   ```\n   SERVICES\n   ├── Use depends_on with condition: service_healthy\n   ├── Add healthchecks for every service\n   ├── Set resource limits (mem_limit, cpus)\n   ├── Use named volumes for persistent data\n   └── Pin image versions\n\n   NETWORKING\n   ├── Create explicit networks (don't rely on default)\n   ├── Separate frontend and backend networks\n   ├── Only expose ports that need external access\n   └── Use internal: true for backend-only networks\n\n   ENVIRONMENT\n   ├── Use env_file for secrets, not inline environment\n   ├── Never commit .env files (add to .gitignore)\n   ├── Use variable substitution: ${VAR:-default}\n   └── Document all required env vars\n\n   DEVELOPMENT vs PRODUCTION\n   ├── Use compose profiles or override files\n   ├── Dev: bind mounts for hot reload, debug ports exposed\n   ├── Prod: named volumes, no debug ports, restart: unless-stopped\n   └── docker-compose.override.yml for dev-only config\n   ```\n\n3. **Generate compose file**\n   - Output docker-compose.yml with healthchecks, networks, volumes\n   - Generate .env.example with all required variables documented\n   - Add dev\u002Fprod profile annotations\n\n### `\u002Fdocker:security` — Container Security Audit\n\n1. **Dockerfile audit**\n\n   | Check | Severity | Fix |\n   |-------|----------|-----|\n   | Running as root | Critical | Add `USER nonroot` after creating user |\n   | Using :latest tag | High | Pin to specific version |\n   | Secrets in ENV\u002FARG | Critical | Use BuildKit secrets: `--mount=type=secret` |\n   | COPY with broad glob | Medium | Use specific paths, add .dockerignore |\n   | Unnecessary EXPOSE | Low | Only expose ports the app uses |\n   | No HEALTHCHECK | Medium | Add HEALTHCHECK with appropriate interval |\n   | Privileged instructions | High | Avoid `--privileged`, drop capabilities |\n   | Package manager cache retained | Low | Clean in same RUN layer |\n\n2. **Runtime security checks**\n\n   | Check | Severity | Fix |\n   |-------|----------|-----|\n   | Container running as root | Critical | Set user in Dockerfile or compose |\n   | Writable root filesystem | Medium | Use `read_only: true` in compose |\n   | All capabilities retained | High | Drop all, add only needed: `cap_drop: [ALL]` |\n   | No resource limits | Medium | Set `mem_limit` and `cpus` |\n   | Host network mode | High | Use bridge or custom network |\n   | Sensitive mounts | Critical | Never mount \u002Fetc, \u002Fvar\u002Frun\u002Fdocker.sock in prod |\n   | No log driver configured | Low | Set `logging:` with size limits |\n\n3. **Generate security report**\n   ```\n   SECURITY AUDIT — [Dockerfile\u002FImage name]\n   Date: [timestamp]\n\n   CRITICAL: [count]\n   HIGH:     [count]\n   MEDIUM:   [count]\n   LOW:      [count]\n\n   [Detailed findings with fix recommendations]\n   ```\n\n---\n\n## Tooling\n\n### `scripts\u002Fdockerfile_analyzer.py`\n\nCLI utility for static analysis of Dockerfiles.\n\n**Features:**\n- Layer count and optimization suggestions\n- Base image analysis with size estimates\n- Anti-pattern detection (15+ rules)\n- Security issue flagging\n- Multi-stage build detection and validation\n- JSON and text output\n\n**Usage:**\n```bash\n# Analyze a Dockerfile\npython3 scripts\u002Fdockerfile_analyzer.py Dockerfile\n\n# JSON output\npython3 scripts\u002Fdockerfile_analyzer.py Dockerfile --output json\n\n# Analyze with security focus\npython3 scripts\u002Fdockerfile_analyzer.py Dockerfile --security\n\n# Check a specific directory\npython3 scripts\u002Fdockerfile_analyzer.py path\u002Fto\u002FDockerfile\n```\n\n### `scripts\u002Fcompose_validator.py`\n\nCLI utility for validating docker-compose files.\n\n**Features:**\n- Service dependency validation\n- Healthcheck presence detection\n- Network configuration analysis\n- Volume mount validation\n- Environment variable audit\n- Port conflict detection\n- Best practice scoring\n\n**Usage:**\n```bash\n# Validate a compose file\npython3 scripts\u002Fcompose_validator.py docker-compose.yml\n\n# JSON output\npython3 scripts\u002Fcompose_validator.py docker-compose.yml --output json\n\n# Strict mode (fail on warnings)\npython3 scripts\u002Fcompose_validator.py docker-compose.yml --strict\n```\n\n---\n\n## Multi-Stage Build Patterns\n\n### Pattern 1: Compiled Language (Go, Rust, C++)\n\n```dockerfile\n# Build stage\nFROM golang:1.22-alpine AS builder\nWORKDIR \u002Fapp\nCOPY go.mod go.sum .\u002F\nRUN go mod download\nCOPY . .\nRUN CGO_ENABLED=0 go build -ldflags=\"-s -w\" -o \u002Fapp\u002Fserver .\u002Fcmd\u002Fserver\n\n# Runtime stage\nFROM gcr.io\u002Fdistroless\u002Fstatic-debian12\nCOPY --from=builder \u002Fapp\u002Fserver \u002Fserver\nUSER nonroot:nonroot\nENTRYPOINT [\"\u002Fserver\"]\n```\n\n### Pattern 2: Node.js \u002F TypeScript\n\n```dockerfile\n# Dependencies stage\nFROM node:20-alpine AS deps\nWORKDIR \u002Fapp\nCOPY package.json package-lock.json .\u002F\nRUN npm ci --production=false\n\n# Build stage\nFROM deps AS builder\nCOPY . .\nRUN npm run build\n\n# Runtime stage\nFROM node:20-alpine\nWORKDIR \u002Fapp\nRUN addgroup -g 1001 -S appgroup && adduser -S appuser -u 1001\nCOPY --from=builder \u002Fapp\u002Fdist .\u002Fdist\nCOPY --from=deps \u002Fapp\u002Fnode_modules .\u002Fnode_modules\nCOPY package.json .\u002F\nUSER appuser\nEXPOSE 3000\nCMD [\"node\", \"dist\u002Findex.js\"]\n```\n\n### Pattern 3: Python\n\n```dockerfile\n# Build stage\nFROM python:3.12-slim AS builder\nWORKDIR \u002Fapp\nCOPY requirements.txt .\nRUN pip install --no-cache-dir --prefix=\u002Finstall -r requirements.txt\n\n# Runtime stage\nFROM python:3.12-slim\nWORKDIR \u002Fapp\nRUN groupadd -r appgroup && useradd -r -g appgroup appuser\nCOPY --from=builder \u002Finstall \u002Fusr\u002Flocal\nCOPY . .\nUSER appuser\nEXPOSE 8000\nCMD [\"python\", \"-m\", \"uvicorn\", \"main:app\", \"--host\", \"0.0.0.0\", \"--port\", \"8000\"]\n```\n\n---\n\n## Base Image Decision Tree\n\n```\nIs it a compiled binary (Go, Rust, C)?\n├── Yes → distroless\u002Fstatic or scratch\n└── No\n    ├── Need a shell for debugging?\n    │   ├── Yes → alpine variant (e.g., node:20-alpine)\n    │   └── No → distroless variant\n    ├── Need glibc (not musl)?\n    │   ├── Yes → slim variant (e.g., python:3.12-slim)\n    │   └── No → alpine variant\n    └── Need specific OS packages?\n        ├── Many → debian-slim\n        └── Few → alpine + apk add\n```\n\n---\n\n## Proactive Triggers\n\nFlag these without being asked:\n\n- **Dockerfile uses :latest** → Suggest pinning to a specific version tag.\n- **No .dockerignore** → Create one. At minimum: `.git`, `node_modules`, `__pycache__`, `.env`.\n- **COPY . . before dependency install** → Cache bust. Reorder to install deps first.\n- **Running as root** → Add USER instruction. No exceptions for production.\n- **Secrets in ENV or ARG** → Use BuildKit secret mounts. Never bake secrets into layers.\n- **Image over 1GB** → Multi-stage build required. No reason for a production image this large.\n- **No healthcheck** → Add one. Orchestrators (Compose, K8s) need it for proper lifecycle management.\n- **apt-get without cleanup in same layer** → `rm -rf \u002Fvar\u002Flib\u002Fapt\u002Flists\u002F*` in the same RUN.\n\n---\n\n## Installation\n\n### One-liner (any tool)\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Falirezarezvani\u002Fclaude-skills.git\ncp -r claude-skills\u002Fengineering\u002Fdocker-development ~\u002F.claude\u002Fskills\u002F\n```\n\n### Multi-tool install\n```bash\n.\u002Fscripts\u002Fconvert.sh --skill docker-development --tool codex|gemini|cursor|windsurf|openclaw\n```\n\n### OpenClaw\n```bash\nclawhub install cs-docker-development\n```\n\n---\n\n## Related Skills\n\n- **senior-devops** — Broader DevOps scope (CI\u002FCD, IaC, monitoring). Complementary — use docker-development for container-specific work, senior-devops for pipeline and infrastructure.\n- **senior-security** — Application security. Complementary — docker-development covers container security, senior-security covers application-level threats.\n- **autoresearch-agent** — Can optimize Docker build times or image sizes as measurable experiments.\n- **ci-cd-pipeline-builder** — Pipeline construction. Complementary — docker-development builds the containers, ci-cd-pipeline-builder deploys them.\n",{"name":5,"license":15,"metadata":24,"description":7},{"author":25,"updated":26,"version":27,"category":28},"Alireza Rezvani",1773619200000,"1.0.0","engineering","main","c2b1fdccc779e99ac814e55fb69ca8d71215dd0f","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection","https:\u002F\u002Fgithub.com\u002FSamuelChien","http:\u002F\u002Fsamuelchien.com\u002F","2026-05-26 08:27:14",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add SamuelChien\u002Fmega-skills-collection --skill docker-development",{"tool":41,"command":42},"bunx","bunx skills add SamuelChien\u002Fmega-skills-collection --skill docker-development",{"tool":44,"command":45},"pnpm","pnpm dlx skills add SamuelChien\u002Fmega-skills-collection --skill docker-development","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fdocker-development\u002FSKILL.md",true,[],[50,57,64,71,78,86],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M76R4WZQZAXGGXMQCA0FZ716","zustand-store-ts","Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state\u002Faction separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzustand-store-ts\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M76R4T9KENDH7FENGZQHBW4G","zustand-store-creator","Zustand Store Creator - Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M76R3YWN84B7SANJ52X799ZE","zero-trust-config-helper","Zero Trust Config Helper - Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M76R3HNSV2AEYSKHM915GJ58","zapier-integration-helper","Zapier Integration Helper - Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":82,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M76R3DJSKAT4FA7DV4BF3GCE","zai-cli","Execute z.AI CLI providing vision, search, reader, and GitHub exploration via CLI and MCP.\nUse when user needs image\u002Fvideo analysis, OCR, UI-to-code conversion, error diagnosis,\nreal-time web search, web page to markdown extraction, or GitHub code exploration.\nTrigger with phrases like \"analyze this image\", \"search the web for\", \"read this page\",\n\"explore this repo\", or \"use zai\". Requires Z_AI_API_KEY.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzai-cli\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M76R2KAM699XE9AJVAWE4H2E","yt-research","Research competitor YouTube channels, niches, and trending topics for your content strategy.\nUse this skill whenever the user says \"research channels\", \"analyze competitors\", \"find trending topics\",\n\"niche analysis\", \"competitive research\", \"what are other creators doing\", \"scrape YouTube channels\",\nor wants to understand the competitive landscape for a specific tool or topic area. Use when working with yt research. Trigger with 'yt', 'research'.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fyt-research\u002FSKILL.md",[],[]]