Token导航 LogoToken导航

Agent Skill · 运维和基础设施

setup-docker-compose(设置 Docker compose)

用于辅助云资源、部署、容器、基础设施和运维自动化任务。它适合让 Agent 检查配置、整理部署步骤、分析资源状态、生成排障思路或辅助云服务接入。使用时需要明确目标环境、账号权限、区域和资源组,区分本地测试与生产操作;涉及删除资源、重启服务、修改网络或权限配置时,应先确认影响范围。

setup-docker-compose 是运维和基础设施类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描已通过,按安装量在运维和基础设施类的 2,449 个 Skill 里排第 1,863。

总安装 371周安装 15GitHub Stars 12下载 116核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:setup-docker-compose(设置 Docker compose)
来源仓库:https://github.com/pjt222/development-guides
仓库路径:skills/setup-docker-compose
安装命令:
npx skills add https://github.com/pjt222/development-guides --skill setup-docker-compose
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/pjt222/development-guides --skill setup-docker-compose

这个 Skill 是做什么的

运维和基础设施类 Skill 处理部署、监控、日志和云资源,多数需要较高的执行权限。

用于辅助云资源、部署和容器管理。适合检查配置、整理部署步骤或分析资源状态。通过 npx skills add 命令从 pjt222/development-guides 仓库安装。使用时需明确目标环境、账号权限和资源组,区分本地测试与生产操作。

setup-docker-compose 属于运维和基础设施类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/setup-docker-compose

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/pjt222/development-guides --skill setup-docker…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

setup-docker-compose 怎么安装?

在终端执行 npx skills add https://github.com/pjt222/development-guides --skill setup-docker-compose。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

setup-docker-compose 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

setup-docker-compose 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

setup-docker-compose 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

setup-docker-compose 用的人多吗?

公开数据是累计安装 371 次,近一周安装 15 次,下载 116 次,GitHub 12 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

setup-docker-compose 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理运维和基础设施类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

运维和基础设施类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
brainstorming

头脑风暴 · Codex、Claude

3,148,776173,131操作浏览器MIT通过
copywriting

文案写作 · Codex、Claude

1,996,72425,583需要联网MIT通过
openclaw-secure-linux-cloud

OpenClaw secure linux cloud 命令行 · Codex、Claude

1,853,08840接触敏感数据未明确未通过
xget

xget 命令行 · Codex、Claude

1,799,28040执行命令未明确未通过
requesting-code-review

代码审查请求 · Codex、Claude

1,590,144173,103权限未标注MIT通过
setup-docker-compose

设置 Docker compose · 本页

37112接触敏感数据未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Set Up Docker Compose

Configure Docker Compose for R development and deployment environments.

When to Use

  • Running R alongside other services (databases, APIs)
  • Setting up a reproducible development environment
  • Orchestrating an R-based MCP server container
  • Managing environment variables and volume mounts

Inputs

  • Required: Dockerfile for the R service
  • Required: Project directory to mount
  • Optional: Additional services (database, cache, web server)
  • Optional: Environment variable configuration

Procedure

Step 1: Create docker-compose.yml

version: '3.8'

services:
  r-dev:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: r-dev
    image: r-dev:latest

    volumes:
      - .:/workspace
      - renv-cache:/workspace/renv/cache

    stdin_open: true
    tty: true

    environment:
      - TERM=xterm-256color
      - R_LIBS_USER=/workspace/renv/library
      - RENV_PATHS_CACHE=/workspace/renv/cache

    command: R

    restart: unless-stopped

volumes:
  renv-cache:
    driver: local

Expected: A docker-compose.yml file exists with the R service defined, including volume mounts for the project directory and renv cache, and environment variables for R library paths.

On failure: If YAML syntax is invalid, validate with docker compose config. Ensure indentation uses spaces (not tabs) and all string values with special characters are quoted.

Step 2: Add Additional Services (If Needed)

services:
  r-dev:
    # ... as above
    depends_on:
      - postgres
    environment:
      - DB_HOST=postgres
      - DB_PORT=5432

  postgres:
    image: postgres:16
    container_name: r-postgres
    environment:
      POSTGRES_DB: analysis
      POSTGRES_USER: ruser
      POSTGRES_PASSWORD_FILE: /run/secrets/db_password
    volumes:
      - pgdata:/var/lib/postgresql/data
    ports:
      - "5432:5432"

volumes:
  renv-cache:
  pgdata:

Expected: The additional service (e.g., PostgreSQL) is defined with its own volume, environment variables, and port mapping. The R service has depends_on referencing the new service.

On failure: If the database service fails to start, check docker compose logs postgres for initialization errors. Verify that environment variables like POSTGRES_PASSWORD_FILE point to valid secrets or switch to POSTGRES_PASSWORD for development.

Step 3: Configure Networking

For services that need localhost access (e.g., MCP servers):

services:
  r-dev:
    network_mode: "host"

For isolated networking:

services:
  r-dev:
    networks:
      - app-network
    ports:
      - "3000:3000"

networks:
  app-network:
    driver: bridge

Expected: Networking is configured appropriately: host mode for services needing localhost access (MCP servers), or bridge networking with explicit port mappings for isolated services.

On failure: If services cannot communicate, verify they are on the same network. With bridge networking, use service names as hostnames (e.g., postgres not localhost). With host mode, use localhost and ensure ports do not conflict.

Step 4: Manage Environment Variables

Create .env file (git-ignored):

R_VERSION=4.5.0
GITHUB_PAT=your_token_here

Reference in compose:

services:
  r-dev:
    build:
      args:
        R_VERSION: ${R_VERSION}
    env_file:
      - .env

Expected: A .env file exists (git-ignored) with project-specific variables, and docker-compose.yml references it via env_file or variable interpolation (${VAR}).

On failure: If variables are not resolving, ensure the .env file is in the same directory as docker-compose.yml. Run docker compose config to see the resolved configuration with all variables expanded.

Step 5: Build and Run

# Build images
docker compose build

# Start services
docker compose up -d

# Attach to R session
docker compose exec r-dev R

# View logs
docker compose logs -f r-dev

# Stop services
docker compose down

Expected: All services start. R session accessible.

On failure: Check docker compose logs for startup errors. Common: port conflicts, missing environment variables.

Step 6: Create Override for Development

Create docker-compose.override.yml for local development settings:

services:
  r-dev:
    volumes:
      - /path/to/local/packages:/extra-packages
    environment:
      - DEBUG=true

This is automatically merged with docker-compose.yml.

Expected: A docker-compose.override.yml file exists with development-specific settings (extra volumes, debug flags) that are automatically applied when running docker compose up.

On failure: If overrides are not taking effect, verify the filename is exactly docker-compose.override.yml. Run docker compose config to confirm the merge. For explicit override files, use docker compose -f docker-compose.yml -f custom-override.yml up.

Validation

  • docker compose build completes without errors
  • docker compose up starts all services
  • Volume mounts correctly share files between host and container
  • Environment variables are available inside containers
  • Services can communicate with each other
  • docker compose down cleanly stops everything

Common Pitfalls

  • Volume mount permissions: Linux containers may create files as root. Use user: directive or fix permissions.
  • Port conflicts: Check for services already using the same ports on the host
  • Docker Desktop vs CLI: docker compose (v2) vs docker-compose (v1). Use v2.
  • WSL path mounts: Use /mnt/c/... paths when mounting Windows directories from WSL
  • Named volumes vs bind mounts: Named volumes persist across rebuilds; bind mounts reflect host changes immediately

Related Skills

  • create-r-dockerfile - create the Dockerfile that compose references
  • containerize-mcp-server - compose configuration for MCP servers
  • optimize-docker-build-cache - speed up compose builds

平台分布

Codex

38.73%
按下载量换算45

Claude

29.13%
按下载量换算34

Cursor

19.66%
按下载量换算23

Gemini CLI

10.24%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills