docker-patterns

docker-patterns is a skill for Claude Code, Codex from loulanyue/awesome-claude-notes. It costs 27 tokens per session (2,135 once invoked), scanned A, a copy of docker-patterns, MIT.

A collection of Docker and Docker Compose patterns for running development environments and multiple services in containers. Containers package an application and its dependencies into isolated runnable units.

In plain words
What is it for?
Use it to create Compose setups, connect application, database, and cache services, troubleshoot volumes or networking, and review container configurations.
Why use it?
It helps reduce differences between developers’ machines and makes service networking, storage, and local setup easier to reason about. It also covers container security and Dockerfile size concerns.

Skill for Claude CodeCodex

Part of the awesome-claude-notes plugin — 106 skills, 61 commands, 29 agents 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/loulanyue/awesome-claude-notes/docker-patterns
Any agent
npx skills add loulanyue/awesome-claude-notes --skill docker-patterns
Clone the repo
git clone --depth 1 https://github.com/loulanyue/awesome-claude-notes

Made for: Claude Code, Codex.

Or install awesome-claude-notes, the plugin that ships this one along with the rest of its 106 skills, 61 commands, 29 agents.

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/loulanyue/awesome-claude-notes/docker-patterns.svg)](https://agentmods.dev/skills/loulanyue/awesome-claude-notes/docker-patterns)
Your own site
<a href="https://agentmods.dev/skills/loulanyue/awesome-claude-notes/docker-patterns"><img src="https://agentmods.dev/badge/skills/loulanyue/awesome-claude-notes/docker-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,135 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin 86% copy Near-identical to another mod 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.00027 $0.02135
Opus 5 $0.00014 $0.01068
Sonnet 5 $0.00005 $0.00427
Haiku 4.5 $0.00003 $0.00214

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

Security

Grade A, and why

docker-patterns 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 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.

Makes network callslowCapability

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

HEALTHCHECK --interval=30s --timeout=3s CMD wget -qO- http://localhost:3000/health || exit 1
Origin

This is a copy

86% identical to docker-patterns — 9 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

docs/ja-JP/skills/docker-patterns/SKILL.md · 374 lines

How it starts

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

Docker Patterns

Docker and Docker Compose best practices for containerized development.

When to Activate

  • Setting up Docker Compose for local development
  • Designing multi-container architectures
  • Troubleshooting container networking or volume issues
  • Reviewing Dockerfiles for security and size
  • Migrating from local dev to containerized workflow

Docker Compose for Local Development

Standard Web App Stack

# docker-compose.yml
services:
  app:
    build:
      context: .
      target: dev                     # Use dev stage of multi-stage Dockerfile
    ports:
      - "3000:3000"
    volumes:
      - .:/app                        # Bind mount for hot reload
      - /app/node_modules             # Anonymous volume -- preserves container deps
    environment:
      - DATABASE_URL=postgres://postgres:postgres@db:5432/app_dev
      - REDIS_URL=redis://redis:6379/0
      - NODE_ENV=development
    depends_on:
      db:
        condition: service_healthy
      redis:
        condition: service_started
    command: npm run dev

  db:
    image: postgres:16-alpine
    ports:
      - "5432:5432"
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres
      POSTGRES_DB: app_dev
    volumes:
      - pgdata:/var/lib/postgresql/data
      - ./scripts/init-db.sql:/docker-entrypoint-initdb.d/init.sql
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres"]
      interval: 5s
      timeout: 3s
      retries: 5

  redis:
    image: redis:7-alpine
    ports:
      - "6379:6379"
    volumes:
      - redisdata:/data

  mailpit:                            # Local email testing
    image: axllent/mailpit
    ports:
      - "8025:8025"                   # Web UI
      - "1025:1025"                   # SMTP

volumes:
  pgdata:
  redisdata:

Development vs Production Dockerfile

# Stage: dependencies
FROM node:22-alpine AS deps
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci

# Stage: dev (hot reload, debug tools)
FROM node:22-alpine AS dev
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
EXPOSE 3000
CMD ["npm", "run", "dev"]

# Stage: build
FROM node:22-alpine AS build
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN npm run build && npm prune --production

# Stage: production (minimal image)
FROM node:22-alpine AS production
WORKDIR /app
RUN addgroup -g 1001 -S appgroup && adduser -S appuser -u 1001
USER appuser
COPY --from=build --chown=appuser:appgroup /app/dist ./dist
COPY --from=build --chown=appuser:appgroup /app/node_modules ./node_modules
COPY --from=build --chown=appuser:appgroup /app/package.json ./
ENV NODE_ENV=production
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=3s CMD wget -qO- http://localhost:3000/health || exit 1
CMD ["node", "dist/server.js"]

Read the full file on GitHub · 374 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 First seen · 374 lines · 27 tokens per session scan A ef4fc4e96d0f

Subscribe to this mod's changes

docker-patterns is a skill published in the GitHub repository loulanyue/awesome-claude-notes (270 stars, last pushed yesterday), licensed MIT. It adds 27 tokens to every session and 2,135 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). It is 86% identical to docker-patterns, differing in 9 lines, and is treated as a copy.

Related

Other skills, from other repositories

docker-patterns

Docker and Docker Compose patterns for local development, container security, networking, volume strategies, and multi-service orchestration.

hashgraph-online/awesome-codex-plugins · 27 tokens

memstack-deployment-docker-setup

Use this skill when the user says 'Docker', 'Dockerfile', 'docker-compose', 'containerize', 'docker-setup', or needs to containerize an application with optimized Docker images and compose configurations. Do NOT use for serverless or static site deployments.

cwinvestments/memstack · 62 tokens

moai-ref-secops

DevSecOps, container, and API operational defensive security reference: CI/CD pipeline hardening, secret scanning, IaC misconfiguration detection, SAST/DAST integration, container image scanning, Kubernetes RBAC hardening, container-escape defense, runtime threat detection, OWASP API Top 10 operational defense, WAF…

modu-ai/moai-adk · 201 tokens

ring:hardening-dockerfiles

Hardening Dockerfiles to reach Docker Hub Health Score grade A: enforcing a non-root USER, minimal/distroless multi-stage base images, no fixable critical/high CVEs, no AGPL-3.0 deps, and SBOM+provenance attestations. Use when creating a new Dockerfile, auditing one for security, or preparing images for Docker Hub…

LerianStudio/ring · 106 tokens

gcp-essentials

Use when running a small product on core Google Cloud via the gcloud CLI: a project, Cloud Run deploys, a locked-down Cloud Storage bucket, managed Cloud SQL, and least-privilege IAM wiring them together. NOT AWS (that is aws-essentials), NOT the CI pipeline that ships the image (that is deployment), NOT Postgres…

ericrisco/rsc-harness · 91 tokens

huawei-cce

Use when creating or managing CCE Kubernetes clusters. Covers cluster creation, node pools, SWR registry, autoscaling. Triggers: CCE, Kubernetes, K8s, cluster, node pool, container, SWR. NOT for: serverless functions (use huawei-functiongraph), serverless containers (use huawei-cce for CCI redirect).

huaweicloud/huaweicloud-devkit · 78 tokens