docker-compose-standards

docker-compose-standards is a cursor rule for Cursor from ivangrynenko/cursorrules. It costs 4 tokens per session (650 once invoked), scanned A, original, MIT.

A Docker Compose code-checking rule for files that define services, networks, and other parts of a multi-container application.

In plain words
What is it for?
Use it when creating or changing docker-compose YAML files to check indentation, image tags, networking, privileges, and service limits.
Why use it?
It helps prevent deprecated settings, inconsistent formatting, unpinned images, unsafe privileged containers, and missing resource limits.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when creating or changing docker-compose YAML files to check indentation, image tags, networking, privileges, and service limits.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/ivangrynenko/cursorrules/docker-compose-standards
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.

Clone the repo
git clone --depth 1 https://github.com/ivangrynenko/cursorrules

Made for: Cursor.

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-compose-standards

README.md
[![agentmods](https://agentmods.dev/badge/rules/ivangrynenko/cursorrules/docker-compose-standards/github.svg)](https://agentmods.dev/rules/ivangrynenko/cursorrules/docker-compose-standards)
Your own site
<a href="https://agentmods.dev/rules/ivangrynenko/cursorrules/docker-compose-standards"><img src="https://agentmods.dev/badge/rules/ivangrynenko/cursorrules/docker-compose-standards/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.

agentmods 80×15 button for docker-compose-standards

Your own site · 80×15
<a href="https://agentmods.dev/rules/ivangrynenko/cursorrules/docker-compose-standards"><img src="https://agentmods.dev/badge/rules/ivangrynenko/cursorrules/docker-compose-standards.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 650 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00004 $0.00650
Opus 5.5 $0.00002 $0.00260
Sonnet 5.5 $0.00001 $0.00130
Haiku 4.5 $0.00000 $0.00065

Measured 3mo ago against content hash 9f57fad3c69f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

docker-compose-standards 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 3mo 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.

.cursor/rules/docker-compose-standards.mdc · 107 lines

How it starts

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

Rule Details

  • Name: docker_compose_best_practices

  • Description: Enforces best practices in docker-compose files to ensure maintainability, security, and consistency

Filters

  • file name: docker-compose\\.ya?ml$
  • event: (file_create|file_modify)

Rejections

  • Conditions:
    • pattern ^\\s*version\\s*: – The 'version' field is deprecated in Docker Compose files. Compose files are now version-less by default.

Rejections

  • Conditions:
    • pattern ^( |\t) – Inconsistent indentation detected. Use 2 spaces for indentation.

Rejections

  • Conditions:
    • pattern ^\\s*links\\s*: – The 'links' key is deprecated. Use networks and service names for inter-service communication.

Rejections

  • Conditions:
    • pattern ^\\s*image\\s*:\\s*[^:]+$ – Specify an explicit image tag to ensure consistency.

Rejections

  • Conditions:
    • pattern ^\\s*privileged\\s*:\\s*true – Running services in privileged mode is discouraged for security reasons.

Rejections

  • Conditions:
    • pattern ^\\s*services\\s*:\\s*[^\\n]+\\n(?!.*\\blimits\\b) – Define resource limits for each service to prevent resource exhaustion.

Suggestions

  • Guidance: To adhere to Docker Compose best practices:
  1. Omit the 'version' field: Compose files are version-less by default.

    services:
      web:
        image: nginx
    
  2. Use consistent indentation: Use 2 spaces for indentation.

    services:
      web:
        image: nginx
    
  3. Avoid 'links' key: Use networks and service names for service communication.

    services:
      web:
        image: nginx
        networks:
          - my-network
      db:
        image: mysql
        networks:
          - my-network
    networks:
      my-network:
    
  4. Specify explicit image tags: Prevent unintended updates by defining image tags.

    services:
      web:
        image: nginx:1.21.0
    
  5. Avoid privileged mode: Do not use 'privileged: true'. Grant specific capabilities if necessary.

    services:
      web:
        image: nginx
        cap_add:
          - NET_ADMIN
    

Read the full file on GitHub · 107 lines

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. 3mo ago First seen · 107 lines · 4 tokens per session scan A 9f57fad3c69f

Subscribe to this mod's changes

docker-compose-standards is a cursor rule published in the GitHub repository ivangrynenko/cursorrules (88 stars, last pushed 1y ago), licensed MIT. It adds 4 tokens to every session and 650 once invoked, about $0.0000 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-30.

Related

docker-compose-standards compared with cursor rules from other repositories

docker-compose-standards next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
docker-compose-standardsivangrynenko/cursorrulesCursor rule881y agoMITA4Cursor
dockernedcodes-ok/cursorrules-collectionCursor rule389mo agoMITA823Cursor
kubernetesnedcodes-ok/cursorrules-collectionCursor rule389mo agoMITA238Cursor
python-containerization-cursorrules-prompt-filePatrickJS/awesome-cursorrulesCursor rule41k6mo agoCC0-1.0A56Cursor
containerization-rulesholtwood/awesome-cursorrules-zhCursor rule2441mo agoMITA0Cursor
deploy-arch-maintenanceTashanGKD/tashan-cursor-skillsCursor rule258mo agoMITA54Cursor
90-devops-deploymentaiagentwithdhruv/ai-dev-stackCursor rule115mo agoMITA0Cursor