docker-setup
Skill7 starsChanged 6 months agoMITView on GitHub
Generates Dockerfile, docker-compose.yml, and .dockerignore for the project. Auto-detects the stack and creates optimized multi-stage builds with caching, health checks, and dev/prod configurations.
- Reads credentials
2 other projects use a version of this.
Adopted by
Most recently taken up by
- brpaz/agent-skillstheir own version, first seen May 17, 2026
- BigPapiCB/Universal-Claude-Skillstheir own version, first seen Feb 6, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- BigPapiCB/Universal-Claude-Skills★ 2same name
- brpaz/agent-skills★ 1same 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 repository45 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- a11y-auditSkill
- api-designSkill
- architecture-reviewSkill
- business-blueprintSkill
- business-logic-auditSkill
- changelogSkill
- ci-pipelineSkill
- code-coverageSkill
- competitive-analysisSkill
- convert-codeSkill
- create-componentSkill
- db-migrationSkill
- debugSkill
- dependency-auditSkill
- deploy-checklistSkill
- design-flowSkill
- env-setupSkill
- error-monitorSkill
- estimateSkill
- explain-codeSkill
- fix-issueSkill
- generate-docsSkill
- git-cleanupSkill
- grill-meSkill
- handoffSkill
- legal-pagesSkill
- memory-importSkill
- memorySkill
- microcopySkill
- migrate-frameworkSkill
- onboardSkill
- optimizeSkill
- pr-summarySkill
- refactorSkill
- reference-appSkill
- review-prSkill
- security-scanSkill
- seo-scaffoldSkill
- tddSkill
- web-launch-checkSkill
- wireframeSkill
- write-skillSkill
- write-testsSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 6 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 49
Use specific image tags, not latest
- Very specific: line 50
Use .dockerignore to minimize context
- Distinctive: line 52
Run as non-root user
- Distinctive: line 54
Use multi-stage builds to minimize final image size
- Distinctive: line 56
Use ENTRYPOINT + CMD pattern
- Distinctive: line 101
Never hardcode secrets in Dockerfile or docker-compose
- Distinctive: line 102
Always use non-root user in production images
- Distinctive: line 103
Always include health checks
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Docker Setup Generator
Detect Stack
!ls package.json requirements.txt pyproject.toml go.mod Cargo.toml *.csproj Gemfile composer.json mix.exs 2>/dev/null
!ls Dockerfile docker-compose* .dockerignore 2>/dev/null
!cat package.json 2>/dev/null | grep -E '"(main|scripts)"' -A 5 | head -10
Generation Process
Step 1: Analyze Requirements
From project files, determine:
- Base image (node:20-alpine, python:3.12-slim, golang:1.22, rust:1.75, etc.)
- Build steps (install deps, compile, bundle)
- Runtime dependencies (only what's needed to run, not to build)
- Port(s) the application listens on
- Required services (database, cache, message queue)
- Environment variables needed
Step 2: Generate Dockerfile
Multi-stage build pattern:
# Stage 1: Dependencies
FROM base AS deps
COPY lock-file .
RUN install-command
# Stage 2: Build
FROM deps AS build
COPY source .
RUN build-command
# Stage 3: Production
FROM base-slim AS production
COPY --from=build /app/dist ./dist
CMD ["start-command"]Best practices to include:
- Use specific image tags, not
latest - Use
.dockerignoreto minimize context - Copy lock files before source (layer caching)
- Run as non-root user
- Set HEALTHCHECK
- Use multi-stage builds to minimize final image size
- Set appropriate EXPOSE port
- Use ENTRYPOINT + CMD pattern
Step 3: Generate docker-compose.yml
services:
app:
build: .
ports: ["3000:3000"]
environment: ...
depends_on: ...
volumes: ... # for dev: mount source code
healthcheck: ...
# Add required services
db: # if database detected
redis: # if cache detectedInclude:
- Development overrides (volume mounts, hot reload)
- Named volumes for persistent data
- Network configuration
- Health checks for all services
- Environment variable references (not hardcoded values)
Step 4: Generate .dockerignore
node_modules/
.git/
dist/
build/
*.log
.env
.env.*Step 5: Document
Add comments explaining:
- Why each stage exists
- How to build:
docker build -t app . - How to run:
docker compose up - How to access:
http://localhost:PORT - How to run tests in Docker
Rules
- Never hardcode secrets in Dockerfile or docker-compose
- Always use non-root user in production images
- Always include health checks
- Minimize image size (alpine/slim base, multi-stage)
- Include .dockerignore to speed up builds
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.

