Logo Docker Compose

Docker Compose

Cộng đồng
gordonmurray
docker-compose

Write, review, and modernize Docker Compose files against the current Compose Specification and the docker compose CLI. Use for authoring compose.yaml or docker-compose.yml, service dependency and healthcheck ordering, profiles, networks, volumes, secrets and configs, build contexts, migrating off V1 and the obsolete version key, or containers that fail to start, restart-loop, report unhealthy, or lose data between runs.

Tổng quan

Nhà phát hànhgordonmurray
Kho mãdata-engineering-skills
Tên kỹ năngdocker-compose
Sao
47
Bản fork
4
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Đầy đủ trong hướng dẫn

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được gordonmurray công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Docker Compose trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/gordonmurray/data-engineering-skills/tree/main/docker-compose
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/gordonmurray/data-engineering-skills.git /tmp/data-engineering-skills
mkdir -p .claude/skills
cp -r /tmp/data-engineering-skills/docker-compose .claude/skills/docker-compose
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Docker Compose trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Docker Compose ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Docker Compose không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Docker Compose Expert

Scope

Writing, reviewing, and modernizing Compose files using the current Compose Specification and the docker compose CLI, plus local multi-container workflows.

Not a Kubernetes or Swarm skill. When a user needs production orchestration, say so rather than stretching Compose to fit.

Current Facts

Release guidance checked on 2026-11-03. Recheck the linked sources before selecting versions for a new deployment; preserve existing project pins.

  • Current CLI release: Compose v5.7.0, published November 2, 2026. Existing installations may still run v2; inspect the binary before using newer features. CLI major versions are separate from obsolete Compose file-format versions.
  • The top-level version property is obsolete. Compose keeps it only for backward compatibility and warns when it is used.
  • Compose validates against the most recent schema regardless of version.
  • Use docker compose, not the old standalone docker-compose command, unless supporting a pinned legacy environment. V1 reached end of life in June 2023.
  • Default file names are compose.yaml (preferred) and compose.yml; docker-compose.yaml and docker-compose.yml remain supported. Compose prefers compose.yaml when both exist.
  • Common top-level keys include name, include, services, models, networks, volumes, secrets, and configs; validate newer keys against the installed CLI.
  • Recent additions gated on a CLI version: service-level pre_start for native init containers needs v5.3.0 (July 2026); build.no_cache_filter and docker compose start --wait need v5.0.0. None of these are available on Compose v2.
  • Jobs: v5.6 introduced partial support for manually triggered jobs. Do not assume scheduled-job support from the existence of the jobs model; check the target CLI and Engine capabilities.
  • restart accepts no, always, on-failure[:max-retries], and unless-stopped, with no version gate on any of them. The on-failure retry limit is long-standing; its spec wording was clarified in February 2026, which is not the same as being new.
  • Compose v5.0.0 removed the internal BuildKit builder and delegates builds to Docker Bake, the same path as docker build.
  • postgres:18-alpine and redis:8-alpine remain available example tags. These floating tags are not production pins or permission to upgrade existing database storage.

Inspect First

Establish before recommending or changing anything:

  1. Read the existing Compose file in full before editing. Preserve service names, networks, and volumes the user already depends on.
  2. Read the CLI version from docker compose version, and confirm it is not the standalone V1 binary. The version gates which keys are available: pre_start needs v5.3.0 or newer.
  3. Identify which services hold persistent state and which ports are currently published to the host.
  4. For startup failures, read docker compose ps and the actual container logs before changing configuration. Most restart loops are an application error, not a Compose error.

Authoring Rules

  • Start with services: and no version: field.
  • Add only the networks, volumes, secrets, configs, profiles, and build settings the workflow actually needs.
  • Use healthchecks plus long-form depends_on with condition: service_healthy when startup order matters. Plain depends_on waits for the container to start, not for the service to be ready.
  • Bind sensitive ports to 127.0.0.1 unless external access is required.
  • Keep internal databases on a backend network with no host port published.
  • Check the CLI version before using a recently added key. A v5-only key may be rejected or ignored by older tooling; successful YAML parsing alone does not prove the requested behavior is supported.
  • For migrations, permission fixes, and other init work on Compose v5.3.0 or newer, use service-level pre_start. Each step runs in an ephemeral container before the service starts, in declared order, and a non-zero exit fails the service and its dependents. This differs from post_start and pre_stop, which run inside the running service container.
  • On Compose v2, pre_start does not exist. Use a one-shot init service plus depends_on: {init: {condition: service_completed_successfully}} instead.
  • Use profiles for optional services such as observability, admin tools, or one-off jobs.
  • Use postgres:18-alpine and redis:8-alpine for current examples unless project requirements say otherwise.

Review Checklist

  • No top-level version:.
  • services: is plural and at the root.
  • Service names are stable and lowercase.
  • Images are pinned for production; avoid latest except in disposable examples.
  • Secrets are not embedded in YAML; use env vars, .env, secret files, or platform secrets.
  • Persistent database state uses named volumes.
  • Development bind mounts are explicit and use :ro when possible.
  • Healthchecks use commands available inside the image.
  • Resource limits are explicit where runaway memory/CPU use is risky.

Safety

  • docker compose down -v deletes named volumes and everything in them. Never offer it as a generic reset without stating that database contents will be destroyed, and confirm first.
  • A bare 5432:5432 publishes the database on every host interface. Use 127.0.0.1:5432:5432 unless remote access is genuinely required.
  • Keep secrets out of committed YAML and never echo secret values into output or logs.
  • Renaming a named volume silently orphans the old data rather than migrating it. Confirm before changing volume definitions on a running stack.

Verify

  • Run docker compose config to confirm the file parses and to inspect the rendered result, including variable interpolation.
  • Bring the stack up and confirm docker compose ps reports the expected services as healthy, not merely running.
  • Confirm each healthcheck command exists inside its image. A healthcheck calling curl in an image without curl reports unhealthy forever.
  • For stateful services, confirm data survives docker compose down followed by docker compose up.
  • Report which services you started, their health status, and anything you could not test.

Update Checklist

  • Recheck Docker Compose docs for newly added keys before recommending them, for example develop, pre_start, or the service-level networks.<name>.interface_name.
  • Recheck upstream image tags before refreshing examples.

Sources

Câu hỏi thường gặp

Kỹ năng AI Docker Compose làm được gì?

Write, review, and modernize Docker Compose files against the current Compose Specification and the docker compose CLI. Use for authoring compose.yaml or docker-compose.yml, service dependency and healthcheck ordering, profiles, networks, volumes, secrets and configs, build contexts, migrating off V1 and the obsolete version key, or containers that fail to start, restart-loop, report unhealthy, or lose data between runs.

Vì sao nên dùng Docker Compose trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Docker Compose là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Docker Compose trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/gordonmurray/data-engineering-skills/tree/main/docker-compose. TypingMind đọc tệp SKILL.md và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Docker Compose?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Docker Compose với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Docker Compose với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Docker Compose có miễn phí không?

Có. Kỹ năng này được gordonmurray phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇