Skip to content

Docker Patterns

Guides the agent through Docker and Docker Compose setup, networking, volumes and container hardening.

Repository
affaan-m/ECC
Stars
295,127
Licence
MIT
Files
1 file

What it does

When installed, the agent follows a set of Docker and Docker Compose best practices when you ask it to containerize an app or review Docker files. It can write compose files for local stacks (app, Postgres, Redis, a mail catcher), suggest multi-stage Dockerfiles, set up networks and volumes, and apply security settings such as non-root users, dropped capabilities and keeping secrets out of images. The file is a set of guidance and example configs; it does not itself run any commands.

Great for

  • Developers moving a web app from local setup to a containerized workflow
  • Teams reviewing Dockerfiles or Compose files for size and security
  • Anyone troubleshooting container networking or volume problems

Skip it if

  • Production hardening decisions that need expert review: the examples are generic and include hardcoded dev credentials that must not be reused as-is
  • Non-Docker environments such as Kubernetes-only or serverless deployments, where the patterns only partly apply

Try asking

  • “Set up a Docker Compose file for my Node app with Postgres and Redis for local development”
  • “Review this Dockerfile for security issues and image size”
  • “Why can my app container not reach the database? Check my Compose networking”
  • “Write a multi-stage Dockerfile with a separate production image”
Step-by-step guide: how to use Docker PatternsInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 1 original files, the MIT licence and an attribution note.

    docker-patterns.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip docker-patterns.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip docker-patterns.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Replace the example database password and any API keys with your own values and keep them in a .env file that is not committed to git
  • Tell the agent your stack and language so it picks the right base image and healthcheck
  • Ask the agent to explain each security setting before applying it, since some (such as read_only) can break apps that write to disk

What's inside

  • SKILL.md

Redistributed unmodified from affaan-m/ECC under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.