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.
npx agentmods add rules/sanjeed5/awesome-cursor-rules-mdc/dockergit clone --depth 1 https://github.com/sanjeed5/awesome-cursor-rules-mdcWhat 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 | $0.01836 | $0.01836 |
| Opus 5 | $0.00918 | $0.00918 |
| Sonnet 5 | $0.00367 | $0.00367 |
| Haiku 4.5 | $0.00184 | $0.00184 |
Grade A, and why
docker scanned grade A 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 3d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
CMD curl -f http://localhost:3000/health || exit 1 Copies of this mod
1 near-identical copy found in the catalogue:
- Docker-guidelines — 100% identical, 21 lines differ
How it starts
The opening of the file, as written. The whole thing — 247 lines — stays where its author put it; the contents beside it link to each section on GitHub.
docker Best Practices
Docker is the cornerstone of modern container-first development. Treat your Dockerfile and docker-compose.yml as critical source code. These rules ensure your images are fast, secure, reproducible, and aligned with modern DevOps practices.
1. Optimize for Multi-Stage Builds
Always use multi-stage builds. This pattern isolates build-time dependencies from runtime, drastically reducing final image size and attack surface.
❌ BAD: Single-stage build with all dependencies
FROM node:20
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
CMD ["node", "dist/server.js"]
✅ GOOD: Multi-stage build for production
# Stage 1: Build application artifacts
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production # Install only production dependencies for build
COPY . .
RUN npm run build
# Stage 2: Create minimal runtime image
FROM node:20-alpine
WORKDIR /app
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules # Copy only necessary runtime modules
USER node # Run as non-root user
EXPOSE 3000
CMD ["node", "dist/server.js"]
2. Choose Minimal, Trusted Base Images
Start with the smallest possible base image from a trusted source (Docker Official Images, Verified Publishers). Alpine variants are often the best choice for minimal footprints.
❌ BAD: Large, generic base image
FROM ubuntu:latest # Too large, many unnecessary packages and vulnerabilities
✅ GOOD: Minimal, specific base image
FROM node:20-alpine # Official, small, specific to Node.js
# Or for static content:
FROM nginx:alpine
3. Leverage .dockerignore
Always use a .dockerignore file to exclude irrelevant files and directories from your build context. This significantly speeds up builds and prevents sensitive or unnecessary files from being copied into the image.
❌ BAD: No .dockerignore (sends node_modules, .git, .env, etc., to the daemon)
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.
- 3d ago First seen · 247 lines · 0 tokens per session scan A 71692f33f0d5
docker is a cursor rule published in the GitHub repository sanjeed5/awesome-cursor-rules-mdc (3,570 stars, last pushed 3mo ago), licensed CC0-1.0. It adds 1,836 tokens to every session, about $0.0092 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
backend
Backend development rules for TT Studio - AI model management backend.
devops-infrastructure
DevOps and infrastructure: Docker, Kubernetes, Terraform, CI/CD. Load when editing Dockerfiles, compose, k8s manifests, Terraform, or workflow YAML — not for application code.
hack
Hack v3 is local-first. This project uses hack for local runtime orchestration (compose + DNS/TLS + logs + sessions). Prefer hack when shell access is available. Use MCP only when shell access is unavailable.
colima-docker-runtime
This workspace uses Colima for Docker; use compose-backed tests when Colima is running.
local-compose-db-lifecycle-for-web-tests
Keep local compose DB lifecycle ready for web tests.
container-rightsizer
Rightsizes container CPU and memory requests and limits using real usage data. Reduces requested resources without hitting OOMKills or CPU throttling.