跳到主内容
智客 ZICQ

技能库 智客分类:运维与云 docker-agent-deploy

Docker Agent Deploy

当将一个多克代理作为服务器(MCP, HTTP API, A2A, ACP, 或 OpenAI 兼容聊天) 曝光时, 使用此技能, 通过 OCI 注册 的“ 多克代理 共享 ” 分配一个代理, 或者用 “ 多克代理 val” 测量代理 质量 。 即使用户只是说他们想"把我的经纪人变成一个MCP服务器","让克洛德·桌面用我的经纪人","把我经纪人介绍给多克·休克","把我经纪人像图像一样推来推去",或者"在CI测试我的经纪人",这种技巧适用. 涵盖`serve mcp/api/a2a/ap/chat ' 听取地址和认证旗;`分享推/推';`eval session JSON'格式;评分指标;`-基线'回归门.

1112 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

当将一个多克代理作为服务器(MCP, HTTP API, A2A, ACP, 或 OpenAI 兼容聊天) 曝光时, 使用此技能, 通过 OCI 注册 的“ 多克代理 共享 ” 分配一个代理, 或者用 “ 多克代理 val” 测量代理 质量 。 即使用户只是说他们想"把我的经纪人变成一个MCP服务器","让克洛德·桌面用我的经纪人","把我经纪人介绍给多克·休克","把我经纪人像图像一样推来推去",或者"在CI测试我的经纪人",这种技巧适用. 涵盖`serve mcp/api/a2a/ap/chat ' 听取地址和认证旗;`分享推/推';`eval session JSON'格式;评分指标;`-基线'回归门.

何时用

这个技能

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Docker Agent: Serving, Sharing, and Evaluating、Overview、When to use this skill、Do not use this skill when、Core guidance、Serving an agent。

文件分析

文件分析:除 SKILL.md 外,正文引用了 references/eval-format.md、references/sources.md、assets/eval-session-example.json,属于带资源的技能包,这些文件按需再读。

官方 description(原文)

Use this skill when exposing a Docker Agent as a server (MCP, HTTP API, A2A, ACP, or OpenAI-compatible chat), distributing an agent via an OCI registry with `docker agent share`, or measuring agent quality with `docker agent eval`. Even if the user just says they want to "turn my agent into an MCP server", "let Claude Desktop use my agent", "publish my agent to Docker Hub", "push my agent like an image", or "test my agent in CI", this skill applies. Covers `serve mcp/api/a2a/acp/chat` listen addresses and auth flags, `share push/pull`, eval session JSON format, scoring metrics, and the `--baseline` regression gate.

Docker Agent: Serving, Sharing, and EvaluatingOverviewWhen to use this skillDo not use this skill whenCore guidanceServing an agentSharing agents via OCI registriesEvaluating agentsVerifyRelated skillsReferencesAssets

兼容:Requires the docker-agent CLI plugin (Docker Desktop 4.63+, or standalone). `docker agent eval` additionally requires a Docker-compatible container runtime (Docker Desktop/Engine, or Podman via `--container-runtime`). Verified against docker-agent as shipped with Docker CLI 29.7.2. · 许可:Apache-2.0

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
docker-agent-deploy
description
Use this skill when exposing a Docker Agent as a server (MCP, HTTP API, A2A, ACP, or OpenAI-compatible chat), distributing an agent via an OCI registry with `docker agent share`, or measuring agent quality with `docker agent eval`. Even if the user just says they want to "turn my agent into an MCP server", "let Claude Desktop use my agent", "publish my agent to Docker Hub", "push my agent like an image", or "test my agent in CI", this skill applies. Covers `serve mcp/api/a2a/acp/chat` listen addresses and auth flags, `share push/pull`, eval session JSON format, scoring metrics, and the `--baseline` regression gate.
compatibility
Requires the docker-agent CLI plugin (Docker Desktop 4.63+, or standalone). `docker agent eval` additionally requires a Docker-compatible container runtime (Docker Desktop/Engine, or Podman via `--container-runtime`). Verified against docker-agent as shipped with Docker CLI 29.7.2.
许可
Apache-2.0
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 3
  • references/eval-format.md
  • references/sources.md
  • assets/eval-session-example.json

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「docker-agent-deploy」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-81d86e1cd91ff0b4-Docker-%E4%BB%A3%E7%90%86%E9%83%A8%E7%BD%B2.html
请存为 .cursor/skills/docker-agent-deploy/SKILL.md 或 .claude/skills/docker-agent-deploy/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/docker/skills 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/docker/skills' --list

npx skills add 'https://github.com/docker/skills' --skill 'docker-agent-deploy'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版

name: docker-agent-deploy description: Use this skill when exposing a Docker Agent as a server (MCP, HTTP API, A2A, ACP, or OpenAI-compatible chat), distributing an agent via an OCI registry with docker agent share, or measuring agent quality with docker agent eval. Even if the user just says they want to "turn my agent into an MCP server", "let Claude Desktop use my agent", "publish my agent to Docker Hub", "push my agent like an image", or "test my agent in CI", this skill applies. Covers serve mcp/api/a2a/acp/chat listen addresses and auth flags, share push/pull, eval session JSON format, scoring metrics, and the --baseline regression gate. license: Apache-2.0 compatibility: Requires the docker-agent CLI plugin (Docker Desktop 4.63+, or standalone). docker agent eval additionally requires a Docker-compatible container runtime (Docker Desktop/Engine, or Podman via --container-runtime). Verified against docker-agent as shipped with Docker CLI 29.7.2.

Docker Agent: Serving, Sharing, and Evaluating

Overview

This skill owns the integration surface of Docker Agent: making an agent reachable by other software (docker agent serve), distributing it through an OCI registry the way container images are distributed (docker agent share), and proving it still behaves after a change (docker agent eval). It assumes the agent config already exists — see docker-agent-config for authoring it, and docker-agent-run for interactive/local invocation.

When to use this skill

Activate this skill when:

  • The user wants an agent reachable over MCP, an OpenAI-compatible chat endpoint, a plain HTTP API, or A2A/ACP.
  • The user wants to publish an agent to Docker Hub (or any OCI registry) or pull one someone else published.
  • The user wants automated evaluations (regression tests) for an agent, or wants to gate CI on eval results.

Do not use this skill when

Do not use this skill when:

  • The task is authoring the agent.yaml itself (models, toolsets, sub_agents) — use docker-agent-config.
  • The task is running the agent interactively on a developer's machine, choosing --safety/--sandbox, or aliases — use docker-agent-run.

Core guidance

Serving an agent

  • Five server modes, each with its own default loopback listen address — never expose any of them beyond loopback without authentication:

    | Mode | Default listen | Auth flag | Has --safety? | | --- | --- | --- | --- | | serve mcp | 127.0.0.1:8081 | --auth-token (only with --http) | Yes (only with --http) | | serve api | 127.0.0.1:8080 | --auth-token | No | | serve chat | 127.0.0.1:8083 | --api-key / --api-key-env | Yes | | serve a2a | 127.0.0.1:8082 | --auth-token | Yes | | serve acp | (stdio only) | n/a | No |

    docker agent serve mcp ./agent.yaml --http --listen 127.0.0.1:9090 --auth-token "$TOKEN"
    
  • serve mcp defaults to stdio transport (for local clients like Claude Desktop); pass --http only when you need a network-reachable MCP endpoint, and set --auth-token whenever you do.

  • Binding any server flag to a non-loopback address without an auth token/key is refused; --insecure-no-auth exists to force it and must be treated as a deliberate, documented exception, never a default.

  • serve mcp (with --http), serve chat, and serve a2a expose --safety (strict/balanced/restricted/autonomous); Docker's docs state it defaults to restricted for these modes when unset. serve api and serve acp expose no --safety flag at all. Never raise --safety to autonomous on a network-reachable listener; if a served agent must approve more, prefer balanced and keep auth enabled.

  • serve api accepts a directory instead of a single file: every .yaml/.yml/.hcl in it is exposed under /api/agents. Use --session-workingdir-root to confine session working directories when the server is reachable by more than one user.

Sharing agents via OCI registries

  • Push and pull agent configs the same way you push and pull images — same registry, same docker login auth:
    docker agent share push ./agent.yaml docker.io/username/my-agent:latest
    docker agent share pull docker.io/username/my-agent:latest
    
  • instruction_file contents are inlined into the pushed artifact automatically, so a published agent stays self-contained — you do not need to bundle the referenced files separately.
  • Pin sub_agents that reference the pushed artifact to a digest (name@sha256:...) once published, to avoid a per-run registry lookup and to guarantee the exact config a consumer gets.
  • Use --force on share pull only when you intend to overwrite a local copy that already exists; without it, an existing local config is left untouched.

Evaluating agents

  • Evals live in an evals/ directory next to the agent config by default; each eval is one JSON session file capturing a user message, the recorded tool calls, and an evals object with the scoring criteria.
  • Create eval sessions from real conversations rather than hand-writing JSON: run the agent interactively, then use the /eval slash command in the TUI to save the session, and edit in relevance/size/assertions criteria afterward.
  • Four scoring dimensions: Tool Calls (F1 against the recorded sequence), Relevance (LLM-judge, --judge-model, default anthropic/claude-opus-5), Size (S/M/L/XL response-length bucket), and Assertions (deterministic checks; see the complete assertion-type list in references/eval-format.md). Prefer assertions over relevance when a check can be exact: they need no judge model and are deterministic, not approximation-prone.
  • Evaluations run inside containers for isolation; a Docker-compatible runtime is required. Dedicated provider API keys (ANTHROPIC_API_KEY/OPENAI_API_KEY) are forwarded automatically. GITHUB_TOKEN/GH_TOKEN are not forwarded automatically (they're broad host credentials, not model keys) — pass them explicitly with -e GITHUB_TOKEN when an agent's provider needs one (e.g. github-copilot).
  • Gate CI on regressions, not on absolute scores, with --baseline:
    docker agent eval ./agent.yaml --baseline results/2026-08-01-run.json --regression-tolerance 0.05
    
    A previously-passing eval that now fails always gates regardless of tolerance; cost changes are reported but never gate. A baseline or run with zero evaluations (e.g. an --only pattern matching nothing) is rejected rather than reported as passing.
  • Use --keep-containers plus your runtime's exec to inspect a failed eval's container; the eval's .db session file holds the full conversation for offline debugging.

Verify

  • After changing a served agent's config, re-run its evals with the same explicit --safety value used in the deployment before restarting the listener — this catches an approval-policy regression before it reaches traffic. If a rollout must be rolled back, restore the prior config and safety flag; never restore an unauthenticated listener as a rollback shortcut.

Related skills

  • For writing or changing the underlying agent.yaml, use docker-agent-config.
  • For local/interactive runs, safety-mode choice, and sandboxing, use docker-agent-run.

References

  • references/eval-format.md — full eval session JSON schema and CLI flag table.
  • references/sources.md — provenance of every rule in this skill.

Assets

  • assets/eval-session-example.json — a minimal eval session file to copy and adapt.

Checks

  • checks/verification.md — Verification runbook for serving, sharing, and evaluating an agent.

相关技能

运维与云

Docker Essentials

用于容器管理,图像操作,调试的基本道克命令和工作流程.

运维与云

Find Skills

从开放的代理技能生态系统中发现并安装技能. 使用时:(1)用户问"我如何做X",X可能拥有现有技能,(2)用户说"为X找到技能"或"是否为X有技能",(3)用户问"你能否做X",X是专门能力,(4)用户想扩展代理能力,(5)用户想搜索工具,模板,或工作流程,(6)用户提到他们希望…

运维与云

Microsoft Foundry

构建,部署,评价,优化,微调,管理微软创始代理,模型,资源最终结束. 用法:铸造、azd ai代理、azd 提供/部署、托管代理脚手架/开发/运行/部署/拖放、即时代理创建、创建代理、更新代理、添加代理工具、援引代理、代理.yaml、评估代理、批量活化、连续活化、持续监测、代理C…

运维与云

Azure Deploy

执行已有.azure/部署计划.md和基础设施文件的ALREADY-PREPARED应用程序的Azure部署。 当用户向 CREATE 请求新应用程序时, 请不要使用此技能 。 这种技能运行了 azd上行, azd 部署, trarraform 应用, 和 az 部署命令带有内置…