docker-patterns
Skill8 starsChanged 19 days agoMITView on GitHub
Container build, security, and caching conventions. Use when editing Dockerfiles, Compose files, build contexts, or .dockerignore.
- Reads credentials
43 other projects use a version of this.
Adopted by
Most recently taken up by
- Rojios/everything-claude-codetheir own version, first seen Nov 8, 2026
- lhbsaa/apex-unifiedtheir own version, first seen Nov 8, 2026
- ahmadvahidi/skill-atlastheir own version, first seen Nov 8, 2026
- Lukk17/agent-standardstheir own version, first seen Nov 7, 2026
- pankaj-mahaur/Agent-Daemontheir own version, first seen Nov 6, 2026
- ku5ic/claude-kittheir own version, first seen Nov 4, 2026
Used with
Projects with it also use content-hash-cache-pattern, configure-ecc and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
royaluniondesign-sysSkillcontent-hash-cache-pattern
Cache expensive file processing results using SHA-256 content hashes — path-independent, auto-invalidating, with service layer separation.
Also in 14 projects that use this
royaluniondesign-sysSkillconfigure-ecc
Interactive installer for Everything Claude Code — guides users through selecting and installing skills and rules to user-level or project-level directories, verifies paths, and optionally optimizes installed files.
Also in 9 projects that use this
junimnjwSkillralphinho-rfc-pipeline
RFC-driven multi-agent DAG execution pattern with quality gates, merge queues, and work unit orchestration.
Also in 9 projects that use this
Yog-SothoSkillpytorch-patterns
PyTorch deep learning patterns and best practices for building robust, efficient, and reproducible training pipelines, model architectures, and data loading. Always activate when the user is writing PyTorch models or training scripts, reviewing deep learning code, debugging training loops or data pipelines, optimizing GPU memory or training speed, setting up reproducible experiments, implementing transfer learning or fine-tuning, or asks anything about nn.Module, DataLoader, autograd, AMP, or torch.compile.
Also in 11 projects that use this
loulanyueSkillnuxt4-patterns
Nuxt 4 app patterns for hydration safety, performance, route rules, lazy loading, and SSR-safe data fetching with useFetch and useAsyncData.
Also in 7 projects that use this
junimnjwSkillcarrier-relationship-management
Codified expertise for managing carrier portfolios, negotiating freight rates, tracking carrier performance, allocating freight, and maintaining strategic carrier relationships. Informed by transportation managers with 15+ years experience. Includes scorecarding frameworks, RFP processes, market intelligence, and compliance vetting. Use when managing carriers, negotiating rates, evaluating carrier performance, or building freight strategies.
Also in 7 projects that use this
- +3 more from royaluniondesign-sys
- +2 more from junimnjw
Other versions43 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 43
- loulanyue/awesome-claude-notes★ 272same name
- langchain-ai/skills-benchmarks★ 116same name
- tranhieutt/software_development_department★ 71same name
- Fmarzochi/EGC★ 61same name
- sabahattink/antigravity-fullstack-hq★ 30same name
- skateddu/claude-code-python-setup★ 28same name
- woxiangyangzhimao/skills★ 14same name
- pekral/cursor-rules★ 10same name
- gongyijie85/dsh-ecc★ 8same name
- VoVuongThanhDat/agentflow★ 8same name
33 more not listed
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 repository20 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- home/CLAUDE.mdCLAUDE.md
- run-claude-code-configSkill
- adrSkill
- api-designSkill
- commitSkill
- django-patternsSkill
- eow-reviewSkill
- git-workflowSkill
- hotfixSkill
- infrastructureSkill
- laterSkill
- mkdocs-styleSkill
- project-setupSkill
- prSkill
- refinementSkill
- security-patternsSkill
- standupSkill
- statusSkill
- testing-patternsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. 0 are common, 3 are distinctive, and 10 are very specific to this project.
0
Common
Most of the 12 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Use multi-stage builds to separate build dependencies from runtime
- Very specific: line 13
Keep the final image as small as possible (use slim or alpine base images)
- Very specific: line 20
Use .dockerignore to exclude unnecessary files from build context
- Very specific: line 24
Always include: .git, node_modules, __pycache__, .env, *.log
- Very specific: line 30
Never run as root -- use USER nonroot or create a dedicated user
- Distinctive: line 31
Don't store secrets in images -- use environment variables or secrets managers
- Very specific: line 34
Use COPY instead of ADD unless you need tar extraction
- Very specific: line 38
Always define HEALTHCHECK in production Dockerfiles
- Very specific: line 39
Use lightweight endpoints (/healthz) that check actual dependencies
- Distinctive: line 45
Use named volumes for persistent data
- Very specific: line 47
Use depends_on with health check conditions
- Very specific: line 48
Use .env files for environment configuration
- Very specific: line 50
Use profiles to group services by environment (dev, test, prod)
“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Docker Patterns
Multi-Stage Builds
- Use multi-stage builds to separate build dependencies from runtime
- Name stages for clarity:
FROM node:20 AS builder - Copy only build artifacts into the final stage
- Keep the final image as small as possible (use
slimoralpinebase images)
Layer Caching
- Order instructions from least to most frequently changing
- Copy dependency files (
package.json,requirements.txt) before source code - Group related
RUNcommands with&&to reduce layers - Use
.dockerignoreto exclude unnecessary files from build context
.dockerignore
- Always include:
.git,node_modules,__pycache__,.env,*.log - Mirror
.gitignorepatterns plus build artifacts - Exclude test files and documentation from production images
Security
- Never run as root -- use
USER nonrootor create a dedicated user - Don't store secrets in images -- use environment variables or secrets managers
- Pin base image versions:
python:3.12-slimnotpython:latest - Scan images for vulnerabilities with
docker scoutortrivy - Use
COPYinstead ofADDunless you need tar extraction
Health Checks
- Always define
HEALTHCHECKin production Dockerfiles - Use lightweight endpoints (
/healthz) that check actual dependencies - Set appropriate intervals, timeouts, and retries
- Health checks should complete quickly (< 5s)
Compose Best Practices
- Use named volumes for persistent data
- Define explicit networks for service isolation
- Use
depends_onwith health check conditions - Use
.envfiles for environment configuration - Define resource limits (
mem_limit,cpus) for production - Use
profilesto group services by environment (dev, test, prod)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

