dockerlisted
Install: claude install-skill arbazkhan971/godmode
# Docker — Docker Mastery
## Activate When
- User invokes `/godmode:docker`
- User says "Dockerfile", "docker compose", "container image", "multi-stage build"
- User says "image size", "docker security", "container optimization"
- User needs to containerize an application for the first time
- User wants to optimize an existing Docker setup
- User needs local development environment with Docker Compose
- Pre-ship check identifies Docker configuration issues
- Godmode orchestrator detects Dockerfile anti-patterns during `/godmode:review`
## Workflow
### Step 1: Assess Docker Context
Understand the project and its containerization needs:
```
DOCKER CONTEXT ASSESSMENT:
Project:
Language/Runtime: <Node.js | Python | Go | Java | Rust | multi-language>
Framework: <Express | Django | Spring | etc.>
Build system: <npm | pip | gradle | cargo | make>
Entry point: <main file or command>
Current Docker state:
Dockerfile: <exists | missing | multiple>
Docker Compose: <exists | missing>
.dockerignore: <exists | missing | incomplete>
Base image: <image:tag>
Image size: <current size>
Build time: <current build time>
Layers: <number of layers>
```
### Step 2: Dockerfile Best Practices
Create or optimize the Dockerfile using production-grade patterns:
#### Multi-Stage Build Pattern
```dockerfile
# --- Stage 1: Dependencies (cached separately from source code)
FROM node:20-alpine AS deps
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci --only=production