docker-patterns

docker-patterns is a skill for Claude Code, Codex from KunanonJ/ai-skills-hub. It costs 40 tokens per session (2,115 once invoked), scanned A, a copy of docker-patterns, MIT.

Guidance for creating Dockerfiles for Node.js, Python, Go, Rust, and Java applications. A Dockerfile describes how to build the container that runs an application.

In plain words
What is it for?
Use it when containerizing an application, preparing it for Docker Compose or cloud deployment, or creating a Dockerfile where none exists.
Why use it?
It helps create consistent development or production environments and avoids common mistakes with images, dependencies, permissions, and startup commands.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is - ./scripts/init-db.sql:/docker-entrypoint-initdb.d/init.sql.

Good fit Use it when containerizing an application, preparing it for Docker Compose or cloud deployment, or creating a Dockerfile where none exists.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/KunanonJ/ai-skills-hub
agentmods
npx agentmods add skills/kunanonj/ai-skills-hub/docker-patterns

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/kunanonj/ai-skills-hub/docker-patterns.svg)](https://agentmods.dev/skills/kunanonj/ai-skills-hub/docker-patterns)
Your own site
<a href="https://agentmods.dev/skills/kunanonj/ai-skills-hub/docker-patterns"><img src="https://agentmods.dev/badge/skills/kunanonj/ai-skills-hub/docker-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,115 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% 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.1 $0.00040 $0.02115
Opus 5 $0.00020 $0.01058
Sonnet 5 $0.00008 $0.00423
Haiku 4.5 $0.00004 $0.00212

Measured 8d ago against content hash e202168a7af5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 8d 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.

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

This is a copy

100% identical to docker-patterns — 0 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.

.agents/skills/docker-patterns/SKILL.md · 377 lines

How it starts

The opening of the file, as written. The whole thing — 377 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 · 377 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. 8d ago First seen · 377 lines · 40 tokens per session scan A e202168a7af5

Subscribe to this mod's changes

docker-patterns is a skill published in the GitHub repository KunanonJ/ai-skills-hub (5 stars, last pushed 1mo ago), licensed MIT. It adds 40 tokens to every session and 2,115 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). It is 100% identical to docker-patterns, differing in 0 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.

loulanyue/awesome-claude-notes · 27 tokens

deployment-patterns

Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications.

loulanyue/awesome-claude-notes · 31 tokens

deploy-check

Deployment readiness check for Docker/Traefik projects. Use when: "deploy check", "deployment check", "ready for deployment", "deploy-check", "before deploy", "production ready".

claude-hangar/claude-hangar · 42 tokens

docker-py

Provides patterns for programmatic Docker container management using the Docker SDK for Python and aiodocker. USE WHEN the user asks to "manage Docker containers from Python", "create containers programmatically", "stream container logs", "execute commands in a running container", "build images with docker-py"…

AnExiledDev/CodeForge · 109 tokens

docker

Guides Dockerfile authoring and Docker Compose orchestration with multi-stage builds, health checks, and dev watch mode. USE WHEN the user asks to "write a Dockerfile", "set up Docker Compose", "create a multi-stage build", "add health checks", "use Docker Compose watch", "optimize Docker image size", or works with…

AnExiledDev/CodeForge · 101 tokens

super-cloud

Cloud platform engineering across AWS/Azure/GCP, IaC, networking, containers, and cost optimisation.

arpitexplores/skills-super · 24 tokens