docker
Skill20 starsChanged 7 months agoMITView on GitHub
Apply when writing or reviewing Dockerfiles, docker compose files, or container build pipelines. Covers layer caching, multi-stage builds, security hardening, and compose conventions.
47 other projects use a version of this.
Adopted by
Most recently taken up by
- fmind/dottheir own version, first seen Oct 5, 2026
- Quad4-Software/skillstheir own version, first seen Oct 3, 2026
- vekzz-dev/opencode-skillstheir own version, first seen Oct 3, 2026
- fworks-tech/agenthoodtheir own version, first seen Sep 28, 2026
- iuliandita/skillstheir own version, first seen Sep 24, 2026
- nahid-sparktales/agent-dispatchertheir own version, first seen Sep 21, 2026
Used with
Projects with it also use ansible, kubernetes and 7 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.
KubementatSkillansible
Ansible automation reference for playbooks, roles, inventory, variables, and modules. Includes Proxmox VE and Docker integration via community.general and community.docker collections. Use when writing playbooks, troubleshooting Ansible runs, or designing automation workflows. Triggers: ansible, playbook, inventory, role, task, handler, vars, jinja2, galaxy, proxmox_kvm, proxmox_lxc, docker_container, docker_compose.
Also in 3 projects that use this
mjunaidcaSkillkubernetes
Production-grade Kubernetes manifests and debugging for containerized applications. This skill should be used when users ask to deploy to Kubernetes, create K8s manifests, containerize for K8s, set up Deployments/Services/Jobs/StatefulSets/CronJobs, create namespaces with resource quotas, set up multi-team isolation, configure ResourceQuota/ LimitRange, secure with RBAC (ServiceAccount, Role, RoleBinding), configure init containers (model download, db wait, migrations), set up sidecars (logging, metrics), or debug pods (CrashLoopBackOff, logs, exec, describe, events). Auto-detects from Dockerfile/code, generates hardened manifests with educational comments. CKAD-aligned.
Also in 6 projects that use this
mjunaidcaSkillhelm
Production-grade Helm 4 chart development, release management, and debugging. This skill should be used when users ask to create Helm charts, deploy with Helm, manage releases (install/upgrade/rollback), push charts to OCI registries, debug failed deployments, configure chart dependencies, create umbrella charts, set up GitOps with ArgoCD/Flux, or troubleshoot Helm issues. Auto-detects from Dockerfile/code, generates production-hardened charts with library patterns. Complements kubernetes skill.
Also in 3 projects that use this
diego-tobalinaSkilllogging
Logging best practices for Java (SLF4J/Logback) and Node.js (Winston/Pino). Use for structured logging, log levels, and avoiding sensitive data exposure.
Also in 4 projects that use this
ihiteshguptaSkillterraform
Expert in Infrastructure as Code with Terraform. Use for creating, managing, and versioning infrastructure across cloud providers.
Also in 4 projects that use this
JohnJBorenSkillci-cd
CI/CD pipeline design, GitHub Actions, testing automation, and deployment strategies
Also in 4 projects that use this
Other versions47 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 47
- codewithmukesh/dotnet-claude-kit★ 750same name
- nth5693/gemini-kit★ 373same name
- TheDecipherist/claude-code-mastery-project-starter-kit★ 338same name
- Mindrally/skills★ 266same name
- avibebuilder/claude-prime★ 120same name
- nahid-sparktales/agent-dispatcher★ 59same name
- kumaran-is/claude-code-onboarding★ 36same name
- neuron-one/GODMODE★ 33same name
- mjunaidca/mjs-agent-skills★ 27same name
- greedychipmunk/agent-skills★ 19same name
37 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 repository49 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/brainstorming.mdcCursor rule
- .cursor/rules/branch-finishing.mdcCursor rule
- .cursor/rules/code-quality.mdcCursor rule
- .cursor/rules/db-schema.mdcCursor rule
- .cursor/rules/debugging.mdcCursor rule
- .cursor/rules/docker.mdcCursor rule
- .cursor/rules/domain-template.mdcCursor rule
- .cursor/rules/drawio.mdcCursor rule
- .cursor/rules/error-log.mdcCursor rule
- .cursor/rules/fastapi.mdcCursor rule
- .cursor/rules/git-conventions.mdcCursor rule
- .cursor/rules/github-cli.mdcCursor rule
- .cursor/rules/implementation-plan.mdcCursor rule
- .cursor/rules/langchain.mdcCursor rule
- .cursor/rules/python.mdcCursor rule
- .cursor/rules/react.mdcCursor rule
- .cursor/rules/review-deployment.mdcCursor rule
- .cursor/rules/security-review.mdcCursor rule
- .cursor/rules/self-extension-workflow.mdcCursor rule
- .cursor/rules/shell-scripting.mdcCursor rule
- .cursor/rules/svg-check.mdcCursor rule
- .cursor/rules/tdd.mdcCursor rule
- .cursor/rules/typescript.mdcCursor rule
- skill-everythingSkill
- brainstormingSkill
- branch-finishingSkill
- code-qualitySkill
- db-schemaSkill
- debuggingSkill
- domain-templateSkill
- drawioSkill
- error-logSkill
- fastapiSkill
- git-conventionsSkill
- github-cliSkill
- implementation-planSkill
- langchainSkill
- pythonSkill
- reactSkill
- review-deploymentSkill
- security-reviewSkill
- self-extension-workflowSkill
- shell-scriptingSkill
- svg-checkSkill
- tddSkill
- <kebab-case-name>Skill
- typescriptSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. 0 are common, 4 are distinctive, and 13 are very specific to this project.
0
Common
Most of the 42 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
13
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Dependency layer first: Always install dependencies in a separate layer before copying application source, so a source change does not …
- Very specific: line 27
Copy only what's needed early: Before copying the full source tree, copy only the dependency manifest files (e.g., requirements.txt, …
- Very specific: line 28
Minimise layer count: Prefer chaining related RUN commands with && and \ continuations rather than issuing one RUN per command.
- Distinctive: line 29
Order by change frequency: Always place instructions that change rarely (OS packages, global tools) before instructions that change often …
- Distinctive: line 33
Use multi-stage for compiled artefacts: Always use a builder stage to compile or bundle, then copy only the final artefact into a minimal …
- Very specific: line 34
Name every stage: Use AS <name> on every FROM line so later stages and docker build --target calls are readable and stable.
- Very specific: line 35
Pin the runtime base image: Always pin base images to a specific digest or immutable tag (e.g., python:3.12.3-slim) in the runtime stage.
- Very specific: line 39
Run as non-root: Always create a dedicated non-root user and switch to it with USER before the final CMD/ENTRYPOINT.
- Very specific: line 40
Never embed secrets in image layers: Never pass secrets via ARG or ENV in a Dockerfile.
- Very specific: line 41
Scan images before push: Before pushing any image to a registry, run an image vulnerability scanner (e.g., trivy image, docker scout) and …
- Very specific: line 42
Prefix docker run -v from Git Bash with MSYS_NO_PATHCONV=1: Always prefix docker run -v calls issued from Git Bash or MSYS on Windows with …
- Very specific: line 46
Maintain a .dockerignore: Always keep a .dockerignore at the repo root that excludes .git, test fixtures, local env files, and build …
- Very specific: line 50
Declare a HEALTHCHECK: Always add a HEALTHCHECK instruction so orchestrators (Compose, Kubernetes) can detect unhealthy containers without …
- Very specific: line 51
Use exec-form ENTRYPOINT: Always write ENTRYPOINT in exec form (["executable", "arg"]) rather than shell form so the process receives OS …
- Very specific: line 55
Set resource limits in compose: Always declare deploy.resources.limits (CPU and memory) for every service in docker-compose.yml to prevent …
- Very specific: line 56
Use compose profiles for optional services: Prefer assigning optional services (e.g., observability stacks, seed jobs) to named profiles so …
- Distinctive: line 57
Isolate networks per stack: Avoid using the default bridge network across unrelated stacks.
“Common” is measured: kept by at least 6 in 10 of the 42 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
Sub-Skill: Docker / Container Conventions
Purpose: Prevent common container mistakes — busted layer caches, bloated images, insecure defaults, and compose misconfigurations — before they reach CI or production.
Rules
Layer Ordering & Cache
- Dependency layer first. Always install dependencies in a separate layer before copying application source, so a source change does not invalidate the package cache. Reference: ERR-2026-020
- Copy only what's needed early. Before copying the full source tree, copy only the dependency manifest files (e.g.,
requirements.txt,package.json,pyproject.toml) so the install layer is cached independently. - Minimise layer count. Prefer chaining related
RUNcommands with&&and\continuations rather than issuing oneRUNper command; eachRUNcreates a new layer. - Order by change frequency. Always place instructions that change rarely (OS packages, global tools) before instructions that change often (app source, config files).
Multi-Stage Builds
- Use multi-stage for compiled artefacts. Always use a builder stage to compile or bundle, then copy only the final artefact into a minimal runtime stage; never ship build toolchains in the production image.
- Name every stage. Use
AS <name>on everyFROMline so later stages anddocker build --targetcalls are readable and stable. - Pin the runtime base image. Always pin base images to a specific digest or immutable tag (e.g.,
python:3.12.3-slim) in the runtime stage; never uselatestin production Dockerfiles.
Security
- Run as non-root. Always create a dedicated non-root user and switch to it with
USERbefore the finalCMD/ENTRYPOINT; never run application processes asrootinside a container. - Never embed secrets in image layers. Never pass secrets via
ARGorENVin a Dockerfile; use Docker BuildKit--secretmounts or runtime environment injection instead. - Scan images before push. Before pushing any image to a registry, run an image vulnerability scanner (e.g.,
trivy image,docker scout) and fail the pipeline on critical CVEs. - Prefix docker run -v from Git Bash with MSYS_NO_PATHCONV=1. Always prefix
docker run -vcalls issued from Git Bash or MSYS on Windows withMSYS_NO_PATHCONV=1to prevent path mangling. Reference: ERR-2026-013
.dockerignore & Context
- Maintain a .dockerignore. Always keep a
.dockerignoreat the repo root that excludes.git, test fixtures, local env files, and build artefacts; a large build context slows every build and may leak secrets.
Health Checks & Signal Handling
- Declare a HEALTHCHECK. Always add a
HEALTHCHECKinstruction so orchestrators (Compose, Kubernetes) can detect unhealthy containers without external probes. - Use exec-form ENTRYPOINT. Always write
ENTRYPOINTin exec form (["executable", "arg"]) rather than shell form so the process receives OS signals directly anddocker stopterminates it cleanly.
Compose Conventions
- Set resource limits in compose. Always declare
deploy.resources.limits(CPU and memory) for every service indocker-compose.ymlto prevent a runaway container from starving the host. - Use compose profiles for optional services. Prefer assigning optional services (e.g., observability stacks, seed jobs) to named
profilessodocker compose upstarts only the core services by default. - Isolate networks per stack. Avoid using the default bridge network across unrelated stacks; define explicit named networks and attach only the services that need to communicate.
See also
skills/code-quality/SKILL.md— general layering and change-frequency ordering principlesskills/review-deployment/SKILL.md— deployment checklist that includes image scanning and migration ordering
Notes
- ERR-2026-020 is the canonical reference for layer-cache busting caused by copying source before installing dependencies.
- ERR-2026-013 covers MSYS path mangling on Windows when using
docker run -v.
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.

