Agent skill · Security

docker-patterns

Docker and Docker Compose patterns for local development, container security, networking, volume strategies, and multi-service orchestration.

mturacgithub.com/mturacGitHub ↗
codexcopilotcursorMIT
Install
npx skills add mturac/everything-openai-codex --skill docker-patterns --agent codex

Same command for any agent — swap --agent for claude-code, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 8 KB
Bundled scripts: none
Path: skills/docker-patterns/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 84
Language: JavaScript

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Docker Patterns Docker and Docker Compose best practices for containerized development. ## When to Activate - Setting up Docker Compose for local development - Designing multi-container architectures - Troubleshooting container networking or volume issues - Reviewing Dockerfiles for security and size - Migrating from local dev to containerized workflow ## Docker Compose for Local Development ### Standard Web App Stack ```yaml # 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"]

What's inside
Steps it walks through
  1. When to Activate
  2. Docker Compose for Local Development
  3. Standard Web App Stack
  4. Development vs Production Dockerfile
  5. Override Files
  6. Networking
  7. Service Discovery
  8. Custom Networks
  9. Exposing Only What's Needed
  10. Volume Strategies
  11. Common Patterns
  12. Container Security
  13. Dockerfile Hardening
  14. Compose Security
Commands it runs
Development (auto-loads override)
docker compose up
Production
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
View logs
docker compose logs -f app           # Follow app logs
docker compose logs --tail=50 db     # Last 50 lines from db
Execute commands in running container
docker compose exec app sh           # Shell into app
docker compose exec db psql -U postgres  # Connect to postgres
More from everything-openai-codex
All skills →
About this skill
What does the docker-patterns skill do?

Docker and Docker Compose patterns for local development, container security, networking, volume strategies, and multi-service orchestration.

How do I install it?

Run `npx skills add mturac/everything-openai-codex --skill docker-patterns --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From mturac/everything-openai-codex, a repository with 84 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going