docker-ops

docker-ops is a skill for Claude Code, Codex from 0xDarkMatter/claude-mods. It costs 70 tokens per session (2,514 once invoked), scanned B, original, MIT.

A guide to building and running applications in Docker containers. A container packages an application with the files and settings it needs to run consistently.

In plain words
What is it for?
Use it to write Dockerfiles, create multi-stage builds, configure Docker Compose services, add health checks, manage build secrets, and reduce unnecessary image contents.
Why use it?
It helps avoid common build, dependency, security, caching, and deployment mistakes in Dockerfiles and Compose setups.

Skill for Claude CodeCodex

Part of the claude-mods plugin — 103 skills, 3 commands, 3 agents, 4 hooks shipped together

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/0xdarkmatter/claude-mods/docker-ops
Any agent
npx skills add 0xDarkMatter/claude-mods --skill docker-ops
Clone the repo
git clone --depth 1 https://github.com/0xDarkMatter/claude-mods

Made for: Claude Code, Codex.

Or install claude-mods, the plugin that ships this one along with the rest of its 103 skills, 3 commands, 3 agents, 4 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for docker-ops

README.md
[![agentmods](https://agentmods.dev/badge/skills/0xdarkmatter/claude-mods/docker-ops.svg)](https://agentmods.dev/skills/0xdarkmatter/claude-mods/docker-ops)
Your own site
<a href="https://agentmods.dev/skills/0xdarkmatter/claude-mods/docker-ops"><img src="https://agentmods.dev/badge/skills/0xdarkmatter/claude-mods/docker-ops.svg" alt="Measured on agentmods" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,514 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 3 findings. 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.00070 $0.02514
Opus 5 $0.00035 $0.01257
Sonnet 5 $0.00014 $0.00503
Haiku 4.5 $0.00007 $0.00251

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

Security

Grade B, and why

docker-ops scanned grade B with 3 findings 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 5d 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 rootlowPrivilege escalation

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

| User | `USER nonroot` (create if needed) | Run as root in production |

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Recursive force deletemediumDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

| Package install | `apt-get update && apt-get install -y ... && rm -rf /var/lib/apt/lists/*` | Separate `RUN` for update and install |

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
skills/docker-ops/SKILL.md · 288 lines

How it starts

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

Docker Operations

Comprehensive Docker patterns for building, running, and composing containerized applications.

Dockerfile Best Practices

Practice Do Don't
Base image FROM node:20-slim FROM node:latest
Layer caching Copy dependency files first, then source COPY . . before RUN install
Package install apt-get update && apt-get install -y ... && rm -rf /var/lib/apt/lists/* Separate RUN for update and install
User USER nonroot (create if needed) Run as root in production
Multi-stage Separate build and runtime stages Ship compiler toolchains
Secrets --mount=type=secret (BuildKit) COPY .env . or ARG PASSWORD
ENTRYPOINT vs CMD ENTRYPOINT for fixed binary, CMD for defaults Relying on shell form for signal handling
WORKDIR WORKDIR /app RUN cd /app && ...
.dockerignore Include .git, node_modules, __pycache__ No .dockerignore at all
Labels LABEL org.opencontainers.image.* No metadata

Multi-Stage Build Decision Tree

Choose your runtime base image by language:

Go ──────────── CGO disabled? ──── Yes ──► scratch or distroless/static
                                   No ───► distroless/base or alpine

Rust ─────────── Static musl? ──── Yes ──► scratch or distroless/static
                                   No ───► distroless/cc or debian-slim

Node.js ──────── Need native? ──── Yes ──► node:20-slim
                                   No ───► node:20-alpine (smaller)

Python ────────── Need C libs? ─── Yes ──► python:3.12-slim
                                   No ───► python:3.12-slim (still slim)

Java ──────────── JRE only ──────────────► eclipse-temurin:21-jre-alpine

See: references/multi-stage-builds.md for complete annotated examples per language.

Layer Caching Rules

Docker caches each layer. A cache miss at layer N invalidates all subsequent layers.

What Invalidates Cache

Trigger Effect
Changed file in COPY/ADD Invalidates this layer + all below
Changed RUN command text Invalidates this layer + all below
Changed ARG value Invalidates from the ARG declaration down
--no-cache flag Invalidates everything
Base image update Invalidates everything

Read the full file on GitHub · 288 lines

Files

What ships with it

5 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. 5d ago First seen · 288 lines · 70 tokens per session scan B 6060177ee990

Subscribe to this mod's changes

docker-ops is a skill published in the GitHub repository 0xDarkMatter/claude-mods (32 stars, last pushed 12d ago), licensed MIT. It adds 70 tokens to every session and 2,514 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 3 findings (asks for root, recursive force delete, makes network calls). 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

redteam-container-detail-pack

Domain routing and boundary guidance for authorized container and orchestration security testing, including Docker escape, Kubernetes privilege escalation, image vulnerabilities, and service mesh bypasses. Use when a task belongs to the container testing domain and needs scope, evidence, pivot, or exit criteria.

Netw0rkNoob/VulnClaw · 59 tokens

docker-hadolint

Docker & Hadolint validation (2026). Use when working with Docker, containers, or validating Dockerfiles.

TheBeardedBearSAS/claude-craft · 28 tokens

docker-expert

Use when containerizing an application with Docker, optimizing multi-stage builds and image size, designing Docker Compose services, troubleshooting container networking or volumes, or adding secure image build and CI/CD practices.

seaworld008/Commonly-used-high-value-skills · 42 tokens

grype-syft-sbom-scanner

用于通过 Syft 生成 SBOM,并用 Grype 扫描容器镜像、文件系统、软件包、归档和 SBOM 漏洞。.

seaworld008/Commonly-used-high-value-skills · 45 tokens

kubernetes-specialist

Use when managing Kubernetes clusters, debugging Pods and workloads, designing Helm charts, reviewing manifests, or improving deployment, scaling, and observability practices.

seaworld008/Commonly-used-high-value-skills · 34 tokens

docker-deploy

Use this skill when building, containerizing, or deploying WrongStack with Docker. Triggers: user says "docker", "container", "dockerfile", "image", "docker-compose", "deploy", "containerize", "registry", "multi-stage", "distroless".

WrongStack/WrongStack · 62 tokens