Agent skill

Docker Compose Setup

by seb1n in seb1n/awesome-ai-agent-skills

Set up and orchestrate multi-container Docker applications using docker-compose, including service configuration, networking, volumes, and environment management.

MITAuto-check: notesDevOps & Cloud

Install Docker Compose Setup

skills CLI
$ npx skills add seb1n/awesome-ai-agent-skills --skill docker-compose-setup -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install seb1n/awesome-ai-agent-skills docker-compose-setup --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/seb1n/awesome-ai-agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/devops-and-infrastructure/docker-compose-setup .claude/skills/docker-compose-setup && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
docker-compose-setup
GitHub stars
206
Token cost
~2.8k tokens
SKILL.md length
876 words
Files
1
Skills in repo
92
Repo updated
First seen
Licence
MIT

At a glance

Set up and orchestrate multi-container Docker applications using docker-compose, including service configuration, networking, volumes, and environment management.

  • Works in 6 steps: Analyze the Application Stack: The agent… → Define Services and Images: For each… → Configure Networking and Service… → …
  • The user requests docker compose setup
  • SKILL.md covers Workflow, Supported Technologies, Usage and Examples, plus 2 more sections
  • Calls docker; needs DB_PASSWORD and SESSION_SECRET

What it does

Docker Compose Setup is an agent skill from seb1n/awesome-ai-agent-skills. Set up and orchestrate multi-container Docker applications using docker-compose, including service configuration, networking, volumes, and environment management. Use when the user requests docker compose setup or provides relevant inputs for this workflow.

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in DevOps & Cloud, covering Containers. It works with Docker. The repository describes itself as: 103 ready-to-use AI agent skills for Claude Code, OpenAI Codex, Gemini CLI, Cursor, GitHub Copilot, Windsurf, and other Agent Skills-compatible tools. Complete SKILL.md… The licence is MIT.

When your agent uses it

  • The user requests docker compose setup
  • Provides relevant inputs for this workflow

Example prompts

  • “/docker-compose-setup”

Requirements

  • Node.js
  • Docker
  • A credential in SESSION_SECRET

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Analyze the Application Stack: The agent reviews the project's architecture to identify all required services and their dependencies. This…
  2. Define Services and Images: For each service, the agent specifies the Docker image or build context, exposed ports, environment variables…
  3. Configure Networking and Service Discovery: The agent creates named Docker networks to isolate traffic between service tiers (e.g., a…
  4. Set Up Volumes and Persistence: The agent defines named volumes for data that must persist across container restarts, such as database…
  5. Add Health Checks and Dependency Ordering: The agent configures health checks for critical services so that dependent services wait until…
  6. Create Environment-Specific Overrides: The agent generates a base docker-compose.yml for shared configuration and an override file…

What it can do on your machine

Read from SKILL.md and the folder at commit 75865a5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • docker

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use docker, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • DB_PASSWORD
    • SESSION_SECRET
    • POSTGRES_PASSWORD

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Docker Compose Setup loads about 2.8k tokens when it runs. Until then it costs about 70 tokens; SKILL.md has 876 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~70
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:266
    - **Use `.env` files for secrets:** Store sensitive values like database passwords and API keys in a `.env` file that is

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from seb1n/awesome-ai-agent-skills at commit 75865a5, republished under its MIT licence (© seb1n). 876 words, ~2,833 tokens.

Download SKILL.mdSave it as .claude/skills/docker-compose-setup/SKILL.md (or your agent's skills folder).
name
docker-compose-setup
description
Set up and orchestrate multi-container Docker applications using docker-compose, including service configuration, networking, volumes, and environment management. Use when the user requests docker compose setup or provides relevant inputs for this workflow.
license
MIT
metadata.author
awesome-ai-agent-skills
metadata.version
1.0.0

Docker Compose Setup

This skill enables the agent to design and configure multi-container application stacks using Docker Compose. The agent can orchestrate services including web servers, databases, caches, background workers, and reverse proxies with proper networking, volume management, health checks, and environment-specific overrides. The agent understands both development and production configurations and can generate compose files that follow Docker best practices.

Workflow

  1. Analyze the Application Stack: The agent reviews the project's architecture to identify all required services and their dependencies. This includes the primary application container, databases (PostgreSQL, MySQL, MongoDB), caches (Redis, Memcached), message queues (RabbitMQ, Kafka), background workers, and reverse proxies (Nginx, Traefik). The agent maps inter-service dependencies to determine startup order and health check requirements.

  2. Define Services and Images: For each service, the agent specifies the Docker image or build context, exposed ports, environment variables, and resource constraints. Application services typically use a build directive pointing to a local Dockerfile, while infrastructure services use official images with pinned version tags. The agent avoids using latest tags in production to ensure reproducible deployments.

  3. Configure Networking and Service Discovery: The agent creates named Docker networks to isolate traffic between service tiers (e.g., a frontend network for the proxy and app, a backend network for the app and database). Services communicate using their compose service names as DNS hostnames, eliminating the need for hardcoded IP addresses.

  4. Set Up Volumes and Persistence: The agent defines named volumes for data that must persist across container restarts, such as database storage and file uploads. For development, bind mounts map the host source code into containers to enable hot reloading. The agent ensures that volume permissions and ownership are configured correctly for the container's runtime user.

  5. Add Health Checks and Dependency Ordering: The agent configures health checks for critical services so that dependent services wait until their dependencies are truly ready, not just started. This prevents common issues like an application container crashing because the database has started but is not yet accepting connections. The depends_on directive with condition: service_healthy enforces correct startup order.

  6. Create Environment-Specific Overrides: The agent generates a base docker-compose.yml for shared configuration and an override file (docker-compose.override.yml for development, docker-compose.prod.yml for production) to customize settings per environment. Development overrides include bind mounts, debug ports, and verbose logging, while production overrides include resource limits, restart policies, and optimized logging drivers.

Supported Technologies

  • Compose Versions: Docker Compose V2 (integrated Docker CLI plugin)
  • Application Runtimes: Node.js, Python, Ruby, Go, Java, PHP, .NET
  • Databases: PostgreSQL, MySQL, MariaDB, MongoDB, Redis, Elasticsearch
  • Reverse Proxies: Nginx, Traefik, Caddy, HAProxy
  • Message Queues: RabbitMQ, Kafka, NATS
  • Monitoring: Prometheus, Grafana, cAdvisor

Usage

Provide the agent with a description of your application stack, including the services needed, their relationships, and whether the setup is for development or production.

Example prompt:

Create a docker-compose setup for my Node.js app with:
- PostgreSQL database with persistent storage
- Redis for session caching
- Nginx reverse proxy with SSL termination
- A Celery-like background worker process
- Development setup with hot reloading

Examples

Example 1: Full Stack Web Application (Node.js + PostgreSQL + Redis + Nginx)
yaml
services:
  nginx:
    image: nginx:1.25-alpine
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
      - ./nginx/certs:/etc/nginx/certs:ro
    depends_on:
      app:
        condition: service_healthy
    networks:
      - frontend
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost/health"]
      interval: 30s
      timeout: 5s
      retries: 3

  app:
    build:
      context: .
      dockerfile: Dockerfile
    environment:
      NODE_ENV: production
      DATABASE_URL: postgres://appuser:${DB_PASSWORD}@postgres:5432/myapp
      REDIS_URL: redis://redis:6379
      SESSION_SECRET: ${SESSION_SECRET}
    depends_on:
      postgres:
        condition: service_healthy
      redis:
        condition: service_healthy
    networks:
      - frontend
      - backend
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "node", "-e", "fetch('http://localhost:3000/health').then(r => r.ok ? process.exit(0) : process.exit(1))"]
      interval: 15s
      timeout: 5s
      retries: 3
      start_period: 30s

  worker:
    build:
      context: .
      dockerfile: Dockerfile
    command: node worker.js
    environment:
      DATABASE_URL: postgres://appuser:${DB_PASSWORD}@postgres:5432/myapp
      REDIS_URL: redis://redis:6379
    depends_on:
      postgres:
        condition: service_healthy
      redis:
        condition: service_healthy
    networks:
      - backend
    restart: unless-stopped

  postgres:
    image: postgres:16-alpine
    environment:
      POSTGRES_DB: myapp
      POSTGRES_USER: appuser
      POSTGRES_PASSWORD: ${DB_PASSWORD}
    volumes:
      - postgres_data:/var/lib/postgresql/data
      - ./init.sql:/docker-entrypoint-initdb.d/init.sql:ro
    networks:
      - backend
    restart: unless-stopped
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U appuser -d myapp"]
      interval: 10s
      timeout: 5s
      retries: 5

  redis:
    image: redis:7-alpine
    command: redis-server --appendonly yes --maxmemory 256mb --maxmemory-policy allkeys-lru
    volumes:
      - redis_data:/data
    networks:
      - backend
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 10s
      timeout: 3s
      retries: 3

volumes:
  postgres_data:
  redis_data:

networks:
  frontend:
  backend:
Example 2: Development vs. Production Overrides

docker-compose.yml (base, shared configuration):

yaml
services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
    environment:
      DATABASE_URL: postgres://appuser:${DB_PASSWORD}@postgres:5432/myapp
      REDIS_URL: redis://redis:6379
    depends_on:
      postgres:
        condition: service_healthy
    networks:
      - backend

  postgres:
    image: postgres:16-alpine
    environment:
      POSTGRES_DB: myapp
      POSTGRES_USER: appuser
      POSTGRES_PASSWORD: ${DB_PASSWORD}
    volumes:
      - postgres_data:/var/lib/postgresql/data
    networks:
      - backend
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U appuser -d myapp"]
      interval: 10s
      timeout: 5s
      retries: 5

volumes:
  postgres_data:

networks:
  backend:

docker-compose.override.yml (development — automatically loaded):

yaml
services:
  app:
    build:
      target: development
    ports:
      - "3000:3000"
      - "9229:9229"   # Node.js debug port
    volumes:
      - .:/app
      - /app/node_modules
    environment:
      NODE_ENV: development
      DEBUG: "app:*"
    command: npm run dev

  postgres:
    ports:
      - "5432:5432"   # Expose DB to host for local tooling

docker-compose.prod.yml (production — used with -f):

yaml
services:
  app:
    build:
      target: production
    restart: unless-stopped
    environment:
      NODE_ENV: production
    deploy:
      resources:
        limits:
          cpus: "1.0"
          memory: 512M
        reservations:
          cpus: "0.5"
          memory: 256M
    logging:
      driver: json-file
      options:
        max-size: "10m"
        max-file: "3"

  postgres:
    restart: unless-stopped
    deploy:
      resources:
        limits:
          cpus: "2.0"
          memory: 1G

Run production with: docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d

Show full SKILL.md (371 more words)Show less

Best Practices

  • Use named volumes for persistent data: Never rely on container-internal storage for databases or uploads. Named volumes survive container recreation and can be backed up independently.
  • Pin image versions: Always specify explicit image tags (e.g., postgres:16-alpine) instead of latest to avoid unexpected breaking changes when images are updated.
  • Implement health checks on every service: Health checks enable Docker to detect unhealthy containers and support depends_on with condition: service_healthy for reliable startup ordering. Without them, dependent services may start before their dependencies are ready.
  • Use .env files for secrets: Store sensitive values like database passwords and API keys in a .env file that is excluded from version control via .gitignore. Reference variables in compose with ${VARIABLE} syntax.
  • Separate networks by tier: Use distinct networks to isolate traffic. A reverse proxy should not be able to reach the database directly. This limits the blast radius of a compromised container.
  • Keep compose files DRY with overrides: Use the base + override pattern instead of duplicating entire compose files for each environment. This ensures that shared service definitions stay in sync.

Edge Cases

  • Port conflicts on the host: If the host port is already in use (e.g., another service on port 5432), Docker Compose will fail to bind. Use unique host ports or set ports: [] for services that only need container-to-container communication via the Docker network.
  • Volume permission mismatches: Containers running as non-root may fail to write to mounted volumes if the host directory has restrictive permissions. Use user: directives in the compose file or chown in the Dockerfile entrypoint to align UID/GID.
  • Build cache invalidation: Changing a COPY or ADD instruction early in the Dockerfile invalidates the cache for all subsequent layers. Order Dockerfile instructions from least to most frequently changed (dependencies before source code) to maximize cache reuse.
  • Container DNS resolution during startup: A service may resolve a dependency's DNS name before the dependency container is assigned an IP, causing connection failures. Health checks with depends_on conditions prevent this, but application-level retry logic is still recommended.
  • Orphaned containers and volumes: Running docker compose up after removing a service from the compose file leaves orphan containers running. Use docker compose up --remove-orphans and periodically run docker volume prune to clean up unused volumes.

© seb1n, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in devops-and-infrastructure/docker-compose-setup of seb1n/awesome-ai-agent-skills.

Open the folder on GitHubat commit 75865a5

Compare with similar skills

Docker Compose Setup next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Docker Compose Setup compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Docker Compose Setup this skillseb1n/awesome-ai-agent-skills206—~2.8kAutomated safety check: NotesMIT
Iron Proxy Gateway for NanoClawnanocoai/nanoclaw31k—~4.6kAutomated safety check: NotesMIT
GreptimeDB Dev Docker ImageGreptimeTeam/greptimedb6.7k—~4kAutomated safety check: NotesApache-2.0
Senior DevOps Toolkitmaslennikov-ig/claude-code-orchestrator-kit2596 repos~1.1kAutomated safety check: NotesCustom licence
LangBot Deployment Guidelangbot-app/LangBot18k—~1.2kAutomated safety check: NotesApache-2.0
Build Openshell Mxc WindowsNVIDIA/OpenShell15k—~4.9kAutomated safety check: PassApache-2.0

Similar skills

  • Installs or refreshes Iron Proxy and its Iron Control web console for NanoClaw, with a local Docker setup, database, credentials and a human approval bridge.

    31k GitHub stars~4.6k tokensUpdated yesterday
    DevOps & CloudAuto-check: notes
  • GreptimeDB Dev Docker Image

    GreptimeTeam/greptimedb

    Packages a locally built GreptimeDB debug binary into a development-only Docker image for local-cluster testing, with an optional push to a dev registry.

    6.7k GitHub stars~4k tokensUpdated 2 days ago
    DevOps & CloudAuto-check: notes
  • Senior DevOps Toolkit

    maslennikov-ig/claude-code-orchestrator-kit

    Comprehensive DevOps skill for CI/CD, infrastructure automation, containerization, and cloud platforms (AWS, GCP, Azure). Includes pipeline setup…

    259 GitHub starsUsed in 6 repos~1.1k tokens
    DevOps & CloudAuto-check: notes
  • LangBot Deployment Guide

    langbot-app/LangBot

    Deploys and configures a LangBot instance with Docker Compose or Kubernetes, covering config.yaml, the Box sandbox runtime, the plugin runtime and the global API key.

    18k GitHub stars~1.2k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • Official

    Maintain and validate OpenShell's build-only Windows MSVC lane for x64 and ARM64.

    15k GitHub stars~4.9k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Omnigent Docker Compose Deploy

    omnigent-ai/omnigent

    Brings up the Omnigent server and Postgres as a Docker compose stack on any Docker host, and covers the Dockerfile's runtime and host build targets for extending it to a new platform.

    11k GitHub stars~1.3k tokensUpdated today
    DevOps & CloudAuto-check: notes

More from seb1n/awesome-ai-agent-skills

All 92 skills in this repo
  • Agent Red Teaming

    seb1n/awesome-ai-agent-skills

    Plan, execute, document, and retest authorized security assessments of AI agents and multi-agent workflows using safe adversarial cases, synthetic identities, canaries, and evidence-based findings.

    206 GitHub stars~2.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Eu AI Act Readiness

    seb1n/awesome-ai-agent-skills

    Build a preliminary, evidence-based EU AI Act readiness assessment across AI-system inventory, territorial scope, operator roles, prohibited-practice screening, risk classification, transparency…

    206 GitHub stars~3.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Human In The Loop

    seb1n/awesome-ai-agent-skills

    Design and verify auditable human oversight, approval gates, escalation paths, and safe state transitions for AI agent workflows.

    206 GitHub stars~2.5k tokensUpdated 1 mo ago
    Auto-check passed
  • MCP Server Building

    seb1n/awesome-ai-agent-skills

    Design, implement, harden, and verify Model Context Protocol (MCP) servers with precise tool contracts, least-privilege authorization, safe transports, structured errors, and interoperability tests.

    206 GitHub stars~2.5k tokensUpdated 1 mo ago
    Auto-check passed
  • PDF Processing

    seb1n/awesome-ai-agent-skills

    Inspect, extract, OCR, create, merge, split, reorder, rotate, annotate, fill, redact, compress, secure, and verify PDF documents while preserving source files and visual fidelity.

    206 GitHub stars~2.5k tokensUpdated 1 mo ago
    Auto-check passed
  • Skill Supply Chain Audit

    seb1n/awesome-ai-agent-skills

    Audit agent skills, plugins, prompts, manifests, scripts, dependencies, and bundled assets for provenance, prompt-injection, permission, execution, exfiltration, persistence, and update risk.

    206 GitHub stars~2.4k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Categories

Questions about Docker Compose Setup

What does Docker Compose Setup do?

Set up and orchestrate multi-container Docker applications using docker-compose, including service configuration, networking, volumes, and environment management. Docker Compose Setup is an agent skill from seb1n/awesome-ai-agent-skills. Set up and orchestrate multi-container Docker applications using docker-compose, including service configuration, networking, volumes, and environment management.

When should I use Docker Compose Setup?

Docker Compose Setup fits situations like: the user requests docker compose setup; provides relevant inputs for this workflow.

How do I install Docker Compose Setup in Claude Code?

Run `npx skills add seb1n/awesome-ai-agent-skills --skill docker-compose-setup -a claude-code`. Or copy the skill folder (devops-and-infrastructure/docker-compose-setup in seb1n/awesome-ai-agent-skills) into .claude/skills/docker-compose-setup in your project. Claude Code loads it when a task matches its description.

How do I install Docker Compose Setup in Codex?

Run `npx skills add seb1n/awesome-ai-agent-skills --skill docker-compose-setup -a codex`. Or copy the skill folder (devops-and-infrastructure/docker-compose-setup in seb1n/awesome-ai-agent-skills) into .agents/skills/docker-compose-setup in your project. Codex loads it when a task matches its description.

Can I use Docker Compose Setup in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add seb1n/awesome-ai-agent-skills --skill docker-compose-setup -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/docker-compose-setup, .gemini/skills/docker-compose-setup, .github/skills/docker-compose-setup and .opencode/skills/docker-compose-setup in your project.

What does Docker Compose Setup need to run?

Going by SKILL.md and its folder, Docker Compose Setup needs the command-line tools its instructions call (docker) and credentials named DB_PASSWORD, SESSION_SECRET and POSTGRES_PASSWORD. Our summary lists: Node.js; Docker; A credential in SESSION_SECRET.

Does Docker Compose Setup access the network?

SKILL.md contains no URLs. Its commands use docker, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Docker Compose Setup safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Docker Compose Setup use?

Docker Compose Setup is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Docker Compose Setup use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Docker Compose Setup?

Skills that share tags, products or a category with Docker Compose Setup: Iron Proxy Gateway for NanoClaw (nanocoai/nanoclaw, 31k stars), GreptimeDB Dev Docker Image (GreptimeTeam/greptimedb, 6.7k stars), Senior DevOps Toolkit (maslennikov-ig/claude-code-orchestrator-kit, 259 stars) and LangBot Deployment Guide (langbot-app/LangBot, 18k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Docker Compose Setup?

seb1n (a GitHub user) maintains it in seb1n/awesome-ai-agent-skills, which has 206 GitHub stars. The repository holds 92 skills in this directory. The repository was last updated on August 9, 2026.

Source: seb1n/awesome-ai-agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.