Showing 28 verified skills. 284 preview entries are hidden until we confirm a real source. Show preview skills · Why?
Generate production-ready Docker configs from your project structure
claude install community/docker-composerIntelligent Docker configuration that analyzes your project and generates optimized multi-stage builds, compose files, and deployment configs.
This is the actual SKILL.md file that powers this skill. Copy it to install.
---
name: docker-composer
description: |
Trigger when the user asks to set up Docker, write a Dockerfile, or create a
docker-compose.yml. Phrases: "dockerize", "add Docker", "compose file",
"Dockerfile", "multi-stage build".
allowed-tools:
- Read
- Write
- Grep
- Bash(docker *)
---
# Docker Composer
Produce a production-quality Dockerfile and docker-compose.yml for a web
application. Handles Node, Python, and Go projects.
## Prerequisites
- Project identifies its stack clearly via package.json, pyproject.toml, or go.mod
- Running locally with a known entry point
## Steps
1. **Detect the stack.** Check lockfiles and manifests:
- `pnpm-lock.yaml` or `package-lock.json` -> Node
- `pyproject.toml` or `requirements.txt` -> Python
- `go.mod` -> Go
2. **Write a multi-stage Dockerfile.** Never ship a Dockerfile that copies
the entire source tree into the final image.
Node example (Next.js with pnpm):
```dockerfile
FROM node:20-alpine AS deps
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN corepack enable && pnpm install --frozen-lockfile
FROM node:20-alpine AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN corepack enable && pnpm build
FROM node:20-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/public ./public
COPY --from=builder /app/package.json ./
COPY --from=deps /app/node_modules ./node_modules
EXPOSE 3000
CMD ["pnpm", "start"]
```
3. **Write docker-compose.yml** for local dev. Include:
- App service with correct port mapping
- Dependencies (Postgres, Redis) with pinned versions
- Named volumes for persistence
- `depends_on` with health checks, not just service order
- Env from `.env`; never hardcode secrets
4. **Add a `.dockerignore`.** At minimum exclude:
```
node_modules
.next
.git
.env*
*.log
dist
coverage
```
5. **Verify the build works:**
```bash
docker compose build
docker compose up
curl -f http://localhost:3000/health
```
## Gotchas
- Using `node:20` instead of `node:20-alpine` or `node:20-slim` doubles image size.
- Forgetting to bind to `0.0.0.0` in the app means the port mapping does not work.
- `COPY . .` before `RUN npm ci` invalidates the dependency cache on every source change.
## Output
- Dockerfile (multi-stage)
- docker-compose.yml
- .dockerignore
- Image builds and runs, health check passes
mkdir -p ~/.claude/skills/docker-composer~/.claude/skills/docker-composer/SKILL.mdResulting file structure:
~/.claude/
skills/
docker-composer/
SKILL.md <-- skill definitionSkills are loaded automatically by Claude Code when you start a new session. The skill name and description in the frontmatter determine when Claude triggers it.
Recommended from shared domain, career, and tool overlap with Docker Composer
Find the needle in your logs - pattern detection and root cause analysis
Both used by Software Engineer, DevOps Engineer
Track SLOs with error budget burn rates and compliance reports
Both used by Software Engineer, DevOps Engineer
Monitor webhook delivery rates and catch failures before customers do
Both used by Software Engineer, DevOps Engineer
Generate Kubernetes manifests and Helm charts from your app specs
Both used by Software Engineer, DevOps Engineer
Manage AWS resources - S3, Lambda, and CloudWatch - from your editor
Both used by Software Engineer, DevOps Engineer
Scan Docker images and configs for CVEs, misconfigs, and secrets
Both used by Software Engineer, DevOps Engineer
Docker Composer