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.
git clone --depth 1 https://github.com/kok-o/koko-contextos-agentsWrote 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.
[](https://agentmods.dev/rules/kok-o/koko-contextos-agents/docker)<a href="https://agentmods.dev/rules/kok-o/koko-contextos-agents/docker"><img src="https://agentmods.dev/badge/rules/kok-o/koko-contextos-agents/docker/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/kok-o/koko-contextos-agents/docker"><img src="https://agentmods.dev/badge/rules/kok-o/koko-contextos-agents/docker.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00021 | $0.01157 |
| Opus 5.5 | $0.00008 | $0.00463 |
| Sonnet 5.5 | $0.00004 | $0.00231 |
| Haiku 4.5 | $0.00002 | $0.00116 |
Grade A, and why
docker scanned grade A with 0 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 1mo 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Skill: docker
Docker
Overview
Containerization, Dockerfile architecture, security best practices, and container orchestration for production workloads.
When to Use
Activate when creating or optimizing Dockerfiles, docker-compose configurations, container security audits, or CI/CD container builds.
Rules & Patterns
Negative Constraints (What NOT to Do)
- NEVER run containers as
rootin production: Always create and switch to an unprivileged non-root user (e.g.USER nodeorUSER nonroot). - NEVER use the
latesttag: Always pin base images to specific immutable version digests or explicit minor tags (e.g.node:20.12.2-alpine3.19). - NEVER copy source code before
package.json: Always copy lockfiles and install dependencies first to leverage Docker's layer caching. - NEVER bake secrets, API keys, or
.envfiles into image layers: Pass secrets via build-time secret mounts (--mount=type=secret) or runtime environment variables. - NEVER include build tools or devDependencies in the final runner image: Always use multi-stage builds to discard compilers and package managers from production images.
Multi-Stage Standard Pattern
FROM node:20.12.2-alpine3.19 AS builder
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build && npm prune --production
FROM node:20.12.2-alpine3.19 AS runner
WORKDIR /app
ENV NODE_ENV=production
RUN addgroup -S -g 1001 appgroup && adduser -S -u 1001 appuser -G appgroup
COPY --from=builder --chown=appuser:appgroup /app/dist ./dist
COPY --from=builder --chown=appuser:appgroup /app/node_modules ./node_modules
USER appuser
CMD ["node", "dist/index.js"]
Code Examples
See EXAMPLES.md for production Dockerfiles and dockerignore patterns.
Validation Checklist
- Multi-stage build separates build tools from runtime
- Non-root
USERdirective active in final stage - Base images pinned to exact versions
-
.dockerignorefile prevents leaking node_modules or secrets
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.
- 1mo ago First seen · 144 lines · 21 tokens per session scan A 3498d8b15d3b
docker is a cursor rule published in the GitHub repository kok-o/koko-contextos-agents (2 stars, last pushed 1mo ago), licensed MIT. It adds 21 tokens to every session and 1,157 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other cursor rules, from other repositories
hatch3r-container-hardening
Container image hardening — digest pinning, distroless / Wolfi base, non-root user, SBOM-in-image, cosign signing + verification, multi-stage builds, CVE scanning.
devenv-containers
Devenv Container and Docker Integration.
drupal-file-permissions
Drupal file permissions security standards.
docker-compose-standards
Docker Compose standards Rule.
lagoon-docker-compose-standards
Standards for Lagoon Docker Compose configuration.
deepen-architecture
Find deepening opportunities in a codebase, informed by the domain language in specs/tech-architecture/tech-stack.md and the decisions in specs/adr/. Use when the user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more testable and AI-navigable.