Docker Patterns

Docker Patterns is a skill for Claude Code, Codex from niels-emmer/myace. It costs 32 tokens per session (964 once invoked), scanned A, original, MIT.

Guidance for running several application services with Docker Compose, a tool that defines and starts containers together. It covers shared and environment-specific settings, service dependencies, health checks, resource limits, and safer runtime settings.

In plain words
What is it for?
Use it when editing Compose files, adding services, separating development from production settings, or hardening a running container stack.
Why use it?
It avoids separate development and production configurations drifting apart and helps services start and run predictably. It also documents controls for limiting resources and reducing the impact of a compromised container.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for aider. Also seen: mentions Codex; built for aider; mentions OpenCode.

Good fit Use it when editing Compose files, adding services, separating development from production settings, or hardening a running container stack.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/niels-emmer/myace/docker-patterns
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.

Any agent
npx skills add niels-emmer/myace --skill docker-patterns
Clone the repo
git clone --depth 1 https://github.com/niels-emmer/myace

Made for: Claude Code, Codex.

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 Patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/niels-emmer/myace/docker-patterns/github.svg)](https://agentmods.dev/skills/niels-emmer/myace/docker-patterns)
Your own site
<a href="https://agentmods.dev/skills/niels-emmer/myace/docker-patterns"><img src="https://agentmods.dev/badge/skills/niels-emmer/myace/docker-patterns/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 Patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/niels-emmer/myace/docker-patterns"><img src="https://agentmods.dev/badge/skills/niels-emmer/myace/docker-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 964 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.00032 $0.00964
Opus 5.5 $0.00013 $0.00386
Sonnet 5.5 $0.00006 $0.00193
Haiku 4.5 $0.00003 $0.00096

Measured yesterday against content hash ffc088d3bede, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

Docker Patterns 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 yesterday.

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.

collections/additional/self-hosted-deploy/skills/docker-patterns/SKILL.md · 135 lines

How it starts

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

Purpose

Get from "an image builds" to "a stack runs predictably in development and production." This skill covers how containers are composed, run, and hardened across environments. For how the image itself is constructed — multi-stage builds, minimal base images, SBOMs, and vulnerability scanning — use the container-build skill when the devops add-on is composed; this one deliberately does not repeat it.

When to use it

Any time you write or change a compose file, add a service, separate development from production configuration, or harden a running stack.

Compose layering

Keep a base file that describes the stack, then layer environment-specific overrides instead of maintaining two divergent files.

# docker-compose.yml — shared definition, no environment-specific choices
services:
  app:
    build: .
    environment:
      NODE_ENV: ${NODE_ENV:-development}
# docker-compose.dev.yml — local development
services:
  app:
    volumes:
      - .:/app
    command: npm run dev
    environment:
      DEBUG: "true"
# docker-compose.prod.yml — production overrides
services:
  app:
    restart: always
    read_only: true
    logging:
      driver: json-file
      options:
        max-size: "10m"
        max-file: "3"

Run a layered stack with docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d. Keep the base file free of anything only one environment needs.

Service dependencies

  • Use depends_on with condition: service_healthy for ordered startup.
  • Give every long-running service a healthcheck.
  • Put services that must talk to each other on a dedicated network; expose only what the reverse proxy needs.
services:
  api:
    build: ./api
    depends_on:
      db:
        condition: service_healthy
    networks: [app-net]

  db:
    image: postgres:16-alpine
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U app"]
      interval: 5s
      timeout: 5s
      retries: 5
    networks: [app-net]

networks:
  app-net:
    driver: bridge

Read the full file on GitHub · 135 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. yesterday Changed · +1 lines ffc088d3bede
  2. 7d ago First seen · 134 lines · 32 tokens per session scan A 812fea9cca96

Subscribe to this mod's changes

Docker Patterns is a skill published in the GitHub repository niels-emmer/myace (1 stars, last pushed yesterday), licensed MIT. It adds 32 tokens to every session and 964 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-11-23.

Related

Docker Patterns compared with skills from other repositories

Docker Patterns next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
Docker Patternsniels-emmer/myaceSkill1yesterdayMITA32Claude Code, Codex
Docker PatternsAmariahAK/atlarix-skillsSkill02mo agoApache-2.0A2Claude Code, Codex
hardening-docker-containers-for-productionxalgorix/xalgorixSkill1.5kyesterdayApache-2.0A43Claude Code, Codex
ecspressokayac/ecspressoSkill1.1k7d agoMITA17Claude Code
coolifyericrisco/rsc-harnessSkill6825d agoMITB100Claude Code, Codex
dockerericrisco/rsc-harnessSkill6825d agoMITB86Claude Code, Codex
loom-dockercosmix/loomSkill66todayMITA9Claude Code