docker-compose

docker-compose is a skill for Claude Code, Codex from znlgis/opengis-skills. It costs 63 tokens per session (3,392 once invoked), scanned B, original, MIT.

A guide to Docker Compose, which describes several Docker containers, their networks, and their stored data in one YAML file. Docker containers are isolated processes used to run application services.

In plain words
What is it for?
Use it to define, build, start, stop, inspect, and connect multi-container applications, including dependency health checks and environment settings.
Why use it?
It removes the need to start and configure each service separately, and records the setup in a repeatable file.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to define, build, start, stop, inspect, and connect multi-container applications, including dependency health checks and environment settings.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/znlgis/opengis-skills/docker-compose
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add znlgis/opengis-skills --skill docker-compose
Clone the repo
git clone --depth 1 https://github.com/znlgis/opengis-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for docker-compose

README.md
[![agentmods](https://agentmods.dev/badge/skills/znlgis/opengis-skills/docker-compose/github.svg)](https://agentmods.dev/skills/znlgis/opengis-skills/docker-compose)
Your own site
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/docker-compose"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/docker-compose/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for docker-compose

Your own site · 80×15
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/docker-compose"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/docker-compose.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 63 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,392 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00063 $0.03392
Opus 5.5 $0.00025 $0.01357
Sonnet 5.5 $0.00013 $0.00678
Haiku 4.5 $0.00006 $0.00339

Measured 4d ago against content hash 9f1259bef910, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

docker-compose scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo apt-get update
others/docker-compose/SKILL.md · 349 lines

How it starts

The opening of the file, as written. The whole thing — 349 lines — stays where its author put it; the contents beside it link to each section on GitHub.

项目地址: https://github.com/docker/compose

官方文档: https://docs.docker.com/compose/

许可证: Apache-2.0 | 最新版本: v5.6.0

概述

Docker Compose 是定义和运行多容器 Docker 应用的工具。它用单个 YAML 文件(默认 compose.yaml)描述应用的服务、网络与卷,再用一条命令统一构建、启动、停止和查看。Compose 是 Compose Specification 的参考实现,旧的 2.x / 3.x 文件格式已并入统一规范,不再需要顶层 version: 字段。它面向单机(单 Docker 引擎)编排,是开发环境与单服务器部署的常用方案。

主要能力:

  • 声明式编排:在 compose.yaml 中定义 services / networks / volumes,配置即代码
  • 生命周期管理:up / down / ps / logs / exec 统一管理全部容器
  • 与 Dockerfile 协作:build 从源码构建镜像,image 直接拉取现成镜像
  • 配置注入:environment / env_file / .env 配合变量插值
  • 启动顺序控制:depends_on + healthcheck 等待依赖就绪
  • 分组开关:profiles 按场景启用调试或工具类服务
  • 多文件叠加:-f base.yaml -f override.yaml 按环境分层覆盖

环境准备

Compose v2+ 以插件形式随 Docker CLI 提供,命令为 docker compose(空格,区别于已停止维护的旧版 docker-compose)。

Docker Desktop(Windows / macOS)

  • 安装 Docker Desktop 即自带 Compose 插件与 Docker Engine,无需单独安装。
  • 启动 Docker Desktop 后,终端即可使用 docker compose。

Linux(Docker Engine + compose 插件)

# Debian / Ubuntu
sudo apt-get update
sudo apt-get install docker-compose-plugin

# RHEL / CentOS / Fedora(dnf 或 yum)
sudo dnf install docker-compose-plugin
# 或
sudo yum install docker-compose-plugin

验证

docker compose version
# 预期输出:Docker Compose version v5.6.0

独立的 docker-compose(v1,Python 实现)已停止维护,请使用 v2+ 的 docker compose 子命令。


核心 API/命令

compose.yaml 顶层结构

name: myapp            # 项目名,默认取所在目录名
services:              # 必填:服务(容器)集合
  web:
    image: nginx:1.27
networks:              # 可选:自定义网络
  frontend:
volumes:               # 可选:命名卷,供多个服务复用
  db-data:
  • services:每个条目定义一个容器及其运行时配置
  • networks:定义服务之间通信的网络,默认自动创建 default 网络
  • volumes:定义命名卷;跨服务复用的卷必须在此声明
  • configs / secrets:挂载配置文件与敏感数据(可选)

服务常用字段

services:
  web:
    image: nginx:1.27                 # 直接使用现成镜像
    # build: .                        # 或从 Dockerfile 构建(二选一)
    ports:
      - "8080:80"                     # 短语法 HOST:CONTAINER
    volumes:
      - ./html:/usr/share/nginx/html  # bind mount(宿主机目录)
      - static:/app/static            # named volume(需顶层声明)
    environment:
      APP_ENV: production
    env_file:
      - .env
    depends_on:
      db:
        condition: service_healthy
    restart: unless-stopped

Read the full file on GitHub · 349 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 349 lines · 63 tokens per session scan B 9f1259bef910

Subscribe to this mod's changes

docker-compose is a skill published in the GitHub repository znlgis/opengis-skills (68 stars, last pushed yesterday), licensed MIT. It adds 63 tokens to every session and 3,392 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-16.

Related

Other skills, from other repositories

docker-compose

Multi-service docker-compose orchestration — service dependency ordering, profiles, override files, environment-specific configs, rolling restarts, and compose-based dev/prod parity patterns.

LuuOW/meridian-mcp · 35 tokens

docker-containerization

Containerize applications with multi-stage Dockerfiles, Docker Compose orchestration, image optimization, and container security. Covers Python, Node.js, and multi-service architectures. Triggers on Docker, containerization, or container orchestration requests.

organvm-iv-taxis/a-i--skills · 50 tokens

docker-docs

Comprehensive Docker 28.x reference covering all features: installation, Dockerfile instructions, multi-stage builds, Docker Compose, networking, volumes, CLI commands, image management, registries, security best practices, CI/CD integration, debugging, and Kubernetes migration. Use whenever the user mentions Docker…

pledgeandgrow/pledge-skills · 93 tokens

docker-essentials

Create and optimize Dockerfiles, docker-compose configurations, and container workflows. Use when containerizing applications, setting up development environments, or optimizing Docker builds.

asgarovf/locusai · 35 tokens

xcloud-docker-deploy

Skill "xcloud-docker-deploy" from Asif2BD/xCloud-Docker-Deploy-Skill, covering xcloud docker deploy v1.4.1, start here, how xcloud works, current xcloud api + agent skills context and api token flow.

Asif2BD/xCloud-Docker-Deploy-Skill · 70 tokens

harbor

CLI toolkit for managing containerized LLM services. Use when the user wants to start, stop, configure, or manage AI/LLM services like Ollama, Open WebUI, llama.cpp, vLLM, LiteLLM, ComfyUI, and 250+ others. Triggers on requests to "run a model", "start ollama", "set up an LLM", "configure harbor", "manage services"…

av/harbor · 114 tokens