Docker Patterns
Master Dockerfile optimization, multi-stage builds, docker-compose patterns, security hardening, and image size reduction techniques for production-grade containerization.
Install
npx skills add cosmicstack-labs/mercury-agent-skills --skill docker-patternsgit clone --depth 1 https://github.com/cosmicstack-labs/mercury-agent-skills.git /tmp/mercury-agent-skills
mkdir -p ~/.claude/skills
cp -r /tmp/mercury-agent-skills/categories/devops/docker-patterns ~/.claude/skills/docker-patternsPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Docker Patterns: Production-Grade Containerization ## Overview Docker patterns encompass the art and science of building efficient, secure, and maintainable container images. This skill covers the entire lifecycle — from writing optimized Dockerfiles and orchestrating multi-service environments with docker-compose to hardening images against vulnerabilities and minimizing attack surface. Mastery of these patterns is essential for any DevOps practitioner aiming to ship reliable, fast, and secure software. --- ## Core Principles 1. **Minimalism** — Every layer, every package, every instruction adds weight and risk. Include only what the runtime needs, nothing more. 2. **Reproducibility** — Builds must produce identical images given the same source. Pin base image tags, lock dependency versions, and avoid network-dependent build steps. 3. **Cache Efficiency** — Order Dockerfile instructions from least to most frequently changing to maximize layer cache reuse. This transforms build times from minutes to seconds. 4. **Defense in Depth** — Never run containers as root. Use read-only root filesystems. Drop all unnecessary Linux capabilities. Scan images before deployment. 5. **Single Responsibility** — Each container should run exactly one process. Use docker-compose to compose multiple containers rather than cramming processes into one image.
Details
- Skill name
docker-patterns- Repository
- cosmicstack-labs/mercury-agent-skills
- Path
categories/devops/docker-patterns/SKILL.md- License
- MIT
- Repo updated
- 25 August 2026
FAQ
What does the Docker Patterns skill do?
Master Dockerfile optimization, multi-stage builds, docker-compose patterns, security hardening, and image size reduction techniques for production-grade containerization.
How do I install the Docker Patterns skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add cosmicstack-labs/mercury-agent-skills --skill docker-patterns. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Docker Patterns popular?
It lives in cosmicstack-labs/mercury-agent-skills, which has 492 GitHub stars and 68 forks.
Related skills
Accessibility
492cosmicstack-labs/mercury-agent-skills
Achieve and maintain WCAG compliance through inclusive design practices, proper ARIA usage, and comprehensive testing methodologies.
Accessibility Testing
492cosmicstack-labs/mercury-agent-skills
WCAG 2.1/2.2 audit, axe, Lighthouse, manual testing, screen reader testing, and remediation
Agent Audit Logging
492cosmicstack-labs/mercury-agent-skills
Implement comprehensive audit logging and reporting for multi-agent systems. Covers event capture, structured logging, traceability, compliance reporting, forensic analysis, and real-time monitoring dashboards for agent actions and decisions.
Kubernetes Patterns
492cosmicstack-labs/mercury-agent-skills
Pods, deployments, services, ingress, RBAC, autoscaling, and production cluster best practices
CI CD Pipeline
492cosmicstack-labs/mercury-agent-skills
Design and implement production-grade CI/CD pipelines with GitHub Actions, layered testing strategies, secure deployment patterns, and environment management.
Monitoring Observability
492cosmicstack-labs/mercury-agent-skills
Prometheus, Grafana, ELK/Loki, Jaeger, metrics, logging, tracing, and alerting
Browse the most popular Claude skills, all devops & cloud skills, or write your own with the skills generator.