docker-patterns

Configure Docker and Docker Compose stacks for secure local development and production.

70|42|Updated Mar 27, 2026
One-click install
npx skills add https://github.com/tranhieutt/software_development_department --skill docker-patterns-tranhieutt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docker-patterns
Source: https://github.com/tranhieutt/software_development_department/tree/main/.claude/skills/docker-patterns
Command: npx skills add https://github.com/tranhieutt/software_development_department --skill docker-patterns-tranhieutt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Docker configurations often drift between development and production, leaving teams with insecure Dockerfiles, brittle volume mounts, and opaque networking that hampers multi-container collaboration. This skill centralizes best practices so teams avoid using :latest tags, running as root, or exposing secrets in version control.

Core Features & Use Cases

  • Docker Compose for local dev: recommends bind mounts for hot reload, overrides for dev tooling, and Compose health checks.
  • Networking and service discovery guidance: explains custom networks and limiting port exposure so services only communicate through intended channels.
  • Volume and secret strategies: covers named volumes for databases, anonymous volumes for dependencies, env_file usage, and Docker secrets for sensitive data.
  • Security hardening: enforces pinned base images, non-root users, capability drops, read-only filesystems, and runtime policies.

Quick Start

Ask docker-patterns to review your Docker Compose stack and recommend secure development and production patterns.

Frequently Asked Questions about docker-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I secure Docker Compose for local development?

To secure Docker Compose for local development, use pinned base images, run containers as non-root users, and manage sensitive data with env_file or Docker secrets. You should also drop capabilities and apply read-only filesystems to prevent unauthorized modifications.

What is the best way to manage volumes and secrets in multi-service Docker Compose stacks?

For multi-service Docker Compose stacks, use named volumes for databases and anonymous volumes for dependencies. Handle sensitive data by using env_file for local variables and Docker secrets for production-grade secret management to keep data out of version control.

How do I configure Docker networking to limit port exposure for multi-container apps?

To limit port exposure in Docker networking, define custom networks so services communicate only through intended channels. This restricts external access by ensuring multi-container apps do not expose all internal ports to the host machine unnecessarily.

Can I use Docker Compose overrides for dev tooling and hot reload?

Yes, you can use Docker Compose overrides to add dev tooling and enable hot reload. By utilizing bind mounts in your override file, local code changes synchronize directly with the running container, streamlining the development workflow.

Does Docker Compose support health checks for migrating multi-container apps to production?

Yes, Docker Compose supports health checks to ensure multi-container apps are production-ready. Adding health check configurations allows services to verify dependencies are fully initialized before starting, preventing startup race conditions during migration.