Docker and container development — use when the user mentions Dockerfiles, multi-stage builds, Docker Compose, container optimization, image size reduction, DDEV, containerization, or dev environment setup with containers. NOT for CI/CD pipeline YAML or pipeline configuration (use cicd-pipelines), NOT for workflow orchestration or release automation (use workflow-automation).
How this skill is triggered — by the user, by Claude, or both
Slash command
/docker-containerization:docker-containerizationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Comprehensive guide for Docker containerization covering core concepts, multi-stage builds, Docker Compose orchestration, development environment setup, and advanced patterns for isolated development workflows.
references/browser-isolation.mdreferences/cors-configuration.mdreferences/ddev-advanced-options.mdreferences/ddev-prerequisites.mdreferences/ddev-quickstart.mdreferences/ddev-troubleshooting.mdreferences/docker-basics.mdreferences/docker-compose.mdreferences/docker-meta-config.mdreferences/docker-troubleshooting.mdreferences/docker-worktree-strategy.mdreferences/extended-patterns.mdreferences/port-allocation.mdscripts/docker_optimize.pyscripts/migrate-browser-isolation.shscripts/setup-mcp-isolation.shscripts/test-isolation.shscripts/tests/test_docker_optimize.pyscripts/validate-prerequisites.shscripts/validate-worktree-connectivity.shComprehensive guide for Docker containerization covering core concepts, multi-stage builds, Docker Compose orchestration, development environment setup, and advanced patterns for isolated development workflows.
Use this skill when:
# Create Dockerfile
cat > Dockerfile <<EOF
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --production
COPY . .
EXPOSE 3000
USER node
CMD ["node", "server.js"]
EOF
# Build and run
docker build -t myapp:1.0 .
docker run -d -p 3000:3000 --name myapp myapp:1.0
See: references/docker-basics.md
# docker-compose.yml
version: '3.8'
services:
web:
build: .
ports:
- "3000:3000"
depends_on:
- db
- redis
environment:
- DATABASE_URL=postgresql://user:pass@db:5432/app
db:
image: postgres:15-alpine
volumes:
- postgres_data:/var/lib/postgresql/data
redis:
image: redis:7-alpine
volumes:
postgres_data:
See: references/docker-compose.md
# Use specific versions (not latest)
FROM node:20.11.0-alpine3.19
# Set working directory
WORKDIR /app
# Copy dependency files first (better caching)
COPY package*.json ./
RUN npm ci --only=production
# Copy application code
COPY . .
# Set environment variables
ENV NODE_ENV=production
# Document exposed ports
EXPOSE 3000
# Create and use non-root user (security)
RUN addgroup -g 1001 -S nodejs && \
adduser -S nodejs -u 1001
USER nodejs
# Default command
CMD ["node", "server.js"]
# Stage 1: Build
FROM node:20-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# Stage 2: Production (smaller image)
FROM node:20-alpine
WORKDIR /app
COPY --from=build /app/dist ./dist
COPY --from=build /app/node_modules ./node_modules
USER node
EXPOSE 3000
CMD ["node", "dist/server.js"]
Benefits: Smaller images, improved security, no build tools in production.
node_modules
.git
.env
*.log
.DS_Store
README.md
docker-compose.yml
dist
coverage
latest| Task | Command |
|---|---|
| Build | docker build -t myapp:1.0 . |
| Run | docker run -d -p 8080:3000 myapp:1.0 |
| Logs | docker logs -f myapp |
| Shell | docker exec -it myapp /bin/sh |
| Stop | docker stop myapp |
| Remove | docker rm myapp |
| Compose up | docker compose up -d |
| Compose down | docker compose down |
| Clean all | docker system prune -a --volumes |
See Extended Patterns for Docker Compose patterns, DDEV setup, worktree isolation, container optimization, CI/CD pipelines, and troubleshooting.
| Topic | Reference File |
|---|---|
| Docker basics and Dockerfile | references/docker-basics.md |
| Docker Compose orchestration | references/docker-compose.md |
| Extended patterns and examples | references/extended-patterns.md |
| Ghostmind meta.json config | references/docker-meta-config.md |
| Worktree Docker strategy | references/docker-worktree-strategy.md |
| Port allocation | references/port-allocation.md |
| Browser isolation | references/browser-isolation.md |
| CORS configuration | references/cors-configuration.md |
| Docker troubleshooting | references/docker-troubleshooting.md |
| DDEV quickstart | references/ddev-quickstart.md |
| DDEV advanced options | references/ddev-advanced-options.md |
| DDEV prerequisites | references/ddev-prerequisites.md |
| DDEV troubleshooting | references/ddev-troubleshooting.md |
| Script | Purpose |
|---|---|
scripts/docker_optimize.py | Analyze and optimize Dockerfiles |
scripts/validate-prerequisites.sh | Check Docker, DDEV installation |
scripts/worktree-manager.sh | Manage isolated worktree environments |
scripts/setup-mcp-isolation.sh | Configure browser MCP isolation |
scripts/validate-worktree-connectivity.sh | Test worktree service connectivity |
scripts/test-isolation.sh | Test browser isolation |
scripts/migrate-browser-isolation.sh | Migrate to new isolation config |
npx claudepluginhub viktorbezdek/skillstack --plugin docker-containerizationProvides Docker Compose setups for local dev stacks with databases and caching, multi-stage Dockerfiles for dev/prod, and patterns for security, networking, volumes, healthchecks.
Provides Docker containerization patterns, best practices, multi-stage builds, Compose configs, networking, storage, security hardening, CI/CD workflows, and debugging techniques. Auto-activates on Dockerfiles, docker-compose files, or FROM/EXPOSE patterns.
Provides Docker and Docker Compose patterns for local development, container security, networking, volume strategies, and multi-service orchestration.