Skip to content
affaan-m avatar

Docker Patterns

Docker and Compose patterns that harden CLI installer tests inside disposable, read-only containers.

CCM score
69 of 100
skills.sh installs
16.8K
GitHub stars
312.6K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers local dev stacks with Compose services, multi-stage Dockerfiles, networking, volumes, and container security hardening
  • Includes installer harnesses that copy projects into a writable tmpfs workspace before any mutation, with Linux distro containers
  • Enforces no-new-privileges, cap_drop: [ALL], read-only roots, pinned image digests, and network_mode: none by default
  • Designed for teams testing CLI installers that need native macOS and Windows CI validation, since Linux containers cannot cover those hosts

Install

$ npx -y skills add affaan-m/ecc --skill docker-patterns -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

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

Details

Repository
github.com/affaan-m/ecc
Categories
DevOps & Cloud, Testing & QA
First seen
Jul 14, 2026

More from affaan-m/ecc

All 257

Similar to Docker Patterns

More DevOps & Cloud