docker-containerization
Skill0 starsChanged 8 months agoMITView on GitHub
Use when creating Dockerfiles, docker-compose configs, optimizing container images, or setting up containerized development environments
- Reads credentials
2 other projects use a version of this.
Adopted by
Most recently taken up by
- 4444J99/a-i--skillstheir own version, first seen Jun 7, 2026
- Kartikk-26/Claude-Code-Skillstheir own version, first seen Dec 17, 2025
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- 4444J99/a-i--skills★ 17same name
- Kartikk-26/Claude-Code-Skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository190 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- accessibility-auditSkill
- accessibility-complianceSkill
- ado-api-cliSkill
- ado-artifactsSkill
- ado-container-deploymentsSkill
- ado-organizationSkill
- ado-pipeline-designSkill
- ado-pipeline-optimizationSkill
- ado-pipeline-securitySkill
- ado-pipelines-opsSkill
- ado-release-managementSkill
- ado-security-policiesSkill
- ado-work-trackingSkill
- adr-writingSkill
- agentic-ai-patternsSkill
- agentic-evalSkill
- agentic-memorySkill
- agentic-reliabilitySkill
- agentic-securitySkill
- ai-data-moatSkill
- ai-harnessSkill
- ai-product-designSkill
- ai-product-monetizationSkill
- ai-product-positioningSkill
- ai-product-retentionSkill
- ai-product-validationSkill
- ai-safety-guardrailsSkill
- add-analytics-instrumentationSkill
- analyze-account-healthSkill
- analyze-ai-topicsSkill
- analyze-chartSkill
- analyze-dashboardSkill
- analyze-experimentSkill
- analyze-feedbackSkill
- compare-user-journeysSkill
- create-chartSkill
- create-dashboardSkill
- daily-briefSkill
- debug-replaySkill
- diagnose-errorsSkill
- diff-intakeSkill
- discover-analytics-patternsSkill
- discover-event-surfacesSkill
- discover-opportunitiesSkill
- instrument-eventsSkill
- investigate-ai-sessionSkill
- monitor-ai-qualitySkill
- monitor-reliabilitySkill
- replay-ux-auditSkill
- review-agent-insightsSkill
- taxonomySkill
- weekly-briefSkill
- what-would-lenny-doSkill
- analytics-reportingSkill
- api-contract-testingSkill
- api-designSkill
- authentication-patternsSkill
- blockchain-auditSkill
- brainstormingSkill
- The first 60 shown.
The file
Files
Docker & Containerization
Overview
Containers should be small, secure, and reproducible. A good Dockerfile builds fast, runs lean, and has no secrets baked in.
When to Use
- Creating Dockerfiles for new projects
- Optimizing image size or build time
- Setting up docker-compose for local development
- Reviewing container security
Multi-Stage Build Pattern
# Stage 1: Build
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build
# Stage 2: Runtime
FROM node:20-alpine
WORKDIR /app
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
USER node
EXPOSE 3000
CMD ["node", "dist/index.js"]Best Practices
- Small base images — use
alpineordistroless, notubuntu - Multi-stage builds — build deps don't belong in runtime image
- Layer ordering — copy
package.jsonbefore source code (cache deps layer) - Non-root user — always
USER nodeorUSER appuser - No secrets in image — use env vars, mounted secrets, or build args (not COPY)
- .dockerignore — exclude
node_modules,.git,.env, test files - Pin versions —
node:20.11-alpinenotnode:latest - Health checks —
HEALTHCHECK CMD curl -f http://localhost:3000/health - One process per container — don't run supervisor/multiple services
Image Size Targets
| Stack | Target Size |
| Node.js | <150MB |
| Python | <200MB |
| Go | <20MB (static binary) |
| Java | <200MB (JRE slim) |
Docker Compose for Dev
services:
app:
build: .
ports: ["3000:3000"]
volumes: ["./src:/app/src"] # hot reload
env_file: .env
depends_on:
db: { condition: service_healthy }
db:
image: postgres:16-alpine
environment:
POSTGRES_DB: app
POSTGRES_PASSWORD: dev
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 5sSecurity Checklist
- Non-root user
- No secrets in image layers
- Pinned base image versions
- Minimal packages installed (no curl/wget in prod unless needed)
- Read-only filesystem where possible
- Scan with
docker scoutortrivy
Integration
- magic-powers:ci-cd-pipeline — build and push images in CI
- magic-powers:infrastructure-review — review container orchestration
- magic-powers:environment-setup — containerized dev environments
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

