docker-patterns

docker-patterns is a skill for Claude Code, Codex from gongyijie85/dsh-ecc. It costs 59 tokens per session (3,545 once invoked), scanned A, a copy of docker-patterns, MIT.

A collection of Docker and Docker Compose patterns for containerized development and multi-service applications. Docker packages software with its dependencies, while Compose defines connected services such as an app, database, and cache.

In plain words
What is it for?
Use it when writing or reviewing Dockerfiles and Compose files, running app stacks locally, testing installers across Linux systems, or planning container deployments.
Why use it?
It helps avoid common problems with local environments, networking, persistent data, container security, and installer testing.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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 writing or reviewing Dockerfiles and Compose files, running app stacks locally, testing installers across Linux systems, or planning container deployments.

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/gongyijie85/dsh-ecc
agentmods
npx agentmods add skills/gongyijie85/dsh-ecc/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/gongyijie85/dsh-ecc/docker-patterns/github.svg)](https://agentmods.dev/skills/gongyijie85/dsh-ecc/docker-patterns)
Your own site
<a href="https://agentmods.dev/skills/gongyijie85/dsh-ecc/docker-patterns"><img src="https://agentmods.dev/badge/skills/gongyijie85/dsh-ecc/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/gongyijie85/dsh-ecc/docker-patterns"><img src="https://agentmods.dev/badge/skills/gongyijie85/dsh-ecc/docker-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,545 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 5 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 257
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 445
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 519
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • high Privilege Escalation · line 264
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
  • medium Tool Misuse · line 29
    Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.
    Fix: Override unsafe defaults with secure settings (verify=True, auth required, restrictive permissions). Review and harden all tool configurations.
How audits are shown
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.00059 $0.03545
Opus 5.5 $0.00024 $0.01418
Sonnet 5.5 $0.00012 $0.00709
Haiku 4.5 $0.00006 $0.00354

Measured 2mo ago against content hash 2a880cf2f640, 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 2 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 2mo 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

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- Use argument arrays or `spawnSync(..., { shell: false })` for cross-platform runners. Never interpolate project paths into a shell command.
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.

skills/docker-patterns/SKILL.md · 521 lines

How it starts

The opening of the file, as written. The whole thing — 521 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.

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 · 521 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. 2mo ago First seen · 521 lines · 59 tokens per session scan A 2a880cf2f640

Subscribe to this mod's changes

docker-patterns is a skill published in the GitHub repository gongyijie85/dsh-ecc (13 stars, last pushed 13d ago), licensed MIT. It adds 59 tokens to every session and 3,545 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). It is 100% identical to docker-patterns, differing in 0 lines, and is treated as a copy.

Related

docker-patterns compared with skills from other repositories

docker-patterns next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
docker-patternsgongyijie85/dsh-eccSkill1313d agoMITA59Claude Code, Codex
manage-taskboardshengsheng90/DSH-taskboardSkill33029d agoApache-2.0A88Codex
database-redisHoangNguyen0403/agent-skills-standardSkill598yesterdayMITA37Claude Code, Codex
deep-researchomagents/omagentsSkill361yesterdayMITB24Codex
hook-developmentSivan757/dsh-agent-plugins-marketSkill235d agoMITA113Claude Code
playlet-wechat-feedredfox-data/redfox-community-dshSkill137d agoMITA269Claude Code, Codex
xiaohongshu-searchredfox-data/redfox-community-dshSkill137d agoMITA84Claude Code, Codex