docker

A set of project-specific rules for building and running Docker images and Docker Compose services. Docker packages software and its dependencies into isolated containers so it can run consistently across environments.

In plain words
What is it for?
Use it when writing Dockerfiles or Compose files, adding services such as databases, configuring production containers, and applying patterns for security, networking, storage, and resource limits.
Why use it?
It helps avoid unsafe images, unreliable builds, missing health checks, exposed secrets, and poorly organised multi-service setups.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/avibebuilder/claude-prime/docker
Any agent
npx skills add avibebuilder/claude-prime --skill docker
Clone the repo
git clone --depth 1 https://github.com/avibebuilder/claude-prime

Made for: Claude Code, Codex.

Per session 157 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 937 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00157 $0.00937
Opus 5 $0.00078 $0.00468
Sonnet 5 $0.00031 $0.00187
Haiku 4.5 $0.00016 $0.00094

Measured 2d ago against content hash cec3595d0fe1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

docker scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

5. **Non-root users** — Always use UID >10000; never run as root in production.
.claude/starter-skills/docker/SKILL.md · 56 lines

How it starts

The opening of the file, as written. The whole thing — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Docker

Project-specific containerization patterns for Dockerfile and Docker Compose.

Architecture Decisions

Image Building

  1. Minimal base images — Use slim/alpine variants; pin to digest for reproducibility.
  2. Multi-stage builds — Separate build dependencies from runtime.
  3. Layer optimization — Combine RUN commands; place frequently changed files last.
  4. COPY over ADD — ADD only for tar extraction or remote URLs.

Security

  1. Non-root users — Always use UID >10000; never run as root in production.
  2. No secrets in images — Use Docker secrets or runtime env injection.
  3. .dockerignore required — Exclude .git, .env, node_modules, build artifacts.

Runtime

  1. One process per container — Single responsibility principle.
  2. Healthchecks required — Define HEALTHCHECK in Dockerfile or Compose.
  3. Resource limits — Always set mem_limit and cpus in production.

Compose

  1. Network segmentation — Dedicated networks per service group.
  2. Named volumes — Never use anonymous volumes in production.
  3. depends_on with healthchecks — Use condition: service_healthy.
  4. Environment separation — Use override files for dev/staging/prod.

Gotchas

  • COPY . . before RUN npm install busts the cache on EVERY code change. Copy package*.json first, install, THEN copy source.
  • Alpine uses musl libc, not glibc. Python packages with C extensions (numpy, pandas, cryptography) may fail to install or need apk add build dependencies. Consider -slim variants if you hit this.
  • ENTRYPOINT ["python", "app.py"] (exec form) handles signals correctly. ENTRYPOINT python app.py (shell form) wraps in /bin/sh -c and PID 1 won't receive SIGTERM — containers take 10s to stop.
  • Docker layer cache is invalidated from the FIRST changed layer downward. A changed COPY near the top rebuilds everything below it.
  • depends_on without condition: service_healthy only waits for container START, not readiness. Your app will crash connecting to a database that's still initializing.
  • host.docker.internal works on Docker Desktop (Mac/Windows) but NOT on Linux. Use --network host or explicit container networking on Linux.
  • Build args (ARG) are NOT available after FROM in multi-stage builds unless re-declared. Each stage starts fresh.
  • docker compose up reuses existing containers. After changing Dockerfile, you need docker compose up --build or docker compose build first.
  • Volume mounts override the container's filesystem — if your node_modules are built inside the container but you mount .:/app, the host's (possibly empty) node_modules shadows them. Use a named volume for node_modules.
  • EXPOSE is documentation only — it does NOT publish the port. You still need -p 8080:8080 or ports: in compose.
  • Docker's default bridge network does NOT provide DNS resolution between containers. Use a custom network or compose's default network.

Read the full file on GitHub · 56 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 56 lines · 157 tokens per session scan B cec3595d0fe1

Subscribe to this mod's changes

docker is a skill published in the GitHub repository avibebuilder/claude-prime (119 stars, last pushed 3mo ago), licensed MIT. It adds 157 tokens to every session and 937 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

docker-compose-setup

Set up and orchestrate multi-container Docker applications using docker-compose, including service configuration, networking, volumes, and environment management. Use when the user requests docker compose setup or provides relevant inputs for this workflow.

seb1n/awesome-ai-agent-skills · 46 tokens

kubernetes-deployment

Deploy, manage, and scale applications on Kubernetes clusters using manifests, Helm charts, and autoscaling configurations. Use when the user requests kubernetes deployment or provides relevant inputs for this workflow.

seb1n/awesome-ai-agent-skills · 43 tokens

model-deployment

Deploy trained machine learning models as production-ready services using REST APIs, containers, serverless functions, and orchestration platforms. Use when the user requests model deployment or provides relevant inputs for this workflow.

seb1n/awesome-ai-agent-skills · 43 tokens

ddev

DDEV local development environment for Craft CMS projects. ALWAYS load this skill when running any ddev command, configuring .ddev/config.yaml, or troubleshooting local container issues. Covers config.yaml (project type, PHP/Node versions, database, docroot), shorthand commands, add-ons and built-in Mailpit, custom…

michtio/craftcms-claude-skills · 350 tokens

kubernetes

· Write/review Kubernetes manifests, Helm, Kustomize, Gateway API, ArgoCD, sealed secrets. Triggers: 'kubernetes', 'k8s', 'helm', 'kubectl', 'deployment', 'pod', 'ingress', 'gateway'.

iuliandita/skills · 58 tokens

cluster-health

· Check Kubernetes cluster health with read-only diagnostics. Triggers: 'cluster health', 'health check', 'cluster status', 'diagnostics', 'post-maintenance', 'node status'. Not for manifests/IaC (use kubernetes).

iuliandita/skills · 53 tokens