Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

dockerDocker 容器开发

Agent Skill

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

总安装

945

周安装

39

GitHub Stars

10

下载量

309
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/oakoss/agent-skills --skill docker

简介

docker 用于辅助云资源、容器部署和基础设施运维任务。

  • 它适合检查配置、整理部署步骤或分析资源状态。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • 使用时需明确目标环境、账号权限和资源组,区分本地与生产操作。
  • 涉及删除资源或修改网络配置时,应先确认影响范围。
  • docker 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Docker

Overview

Docker packages applications into isolated containers that run consistently across environments. A Dockerfile defines the image build steps, Compose orchestrates multi-container services, and production patterns ensure small, secure, performant images.

When to use: Containerizing applications, creating reproducible dev environments, orchestrating multi-service stacks, deploying to container platforms (ECS, Kubernetes, Fly.io, Railway, Coolify).

When NOT to use: Simple static sites with no backend (use CDN deploy), single-binary CLI tools (distribute the binary), or when the target platform has native buildpacks (Heroku, Vercel) and you don't need container control.

Quick Reference

PatternApproachKey Points
Multi-stage buildSeparate builder and production stages80%+ image size reduction, no dev deps in production
Layer cachingCopy lockfile first, install, then copy sourceDependency layer cached across builds
Non-root userRUN adduser + USER in final stageNever run production containers as root
Health checkHEALTHCHECK CMD curl or node/python checkEnables orchestrator restart on failure
.dockerignoreExclude node_modules, .git, .envSmaller build context, faster builds
Compose servicescompose.yaml with service definitionsDev environment in one command
Compose overridecompose.prod.yaml with production settingsEnvironment-specific config without duplication
Named volumesvolumes: in Compose for persistent dataSurvives container recreation
Build cache mountRUN --mount=type=cache,target=/root/.npmPersistent cache across builds
Secrets in buildRUN --mount=type=secret,id=tokenNever bake secrets into image layers
Image pinningPin to major.minor or digestReproducible builds, avoid surprise breakage
Container networkingCustom bridge networks with service discoveryContainers resolve each other by service name
Compose watchdevelop.watch with sync/rebuild actionsLive reload without volume mounts
Init process--init flag or tini entrypointProper signal handling and zombie reaping
Multi-platformdocker buildx build --platformARM (Apple Silicon, Graviton) + x86 in one image
Monorepo pruneturbo prune app --dockerMinimal build context from workspace dependencies
CI layer cachingcache-from/cache-to with GHA or registryAvoid full rebuilds in CI pipelines
Debug containersdocker exec, docker logs, diveInspect running containers and image layers

Common Mistakes

MistakeCorrect Pattern
Installing dev dependencies in production imageMulti-stage build: install in builder, copy artifacts to runtime
Copying source before installing dependenciesCopy lockfile first, npm ci, then copy source for cache reuse
Running as root in productionCreate non-root user, USER directive in final stage
Hardcoding secrets in Dockerfile or ENVUse build secrets (--mount=type=secret) or runtime env
Using latest tag for base imagesPin to specific version (node:24-alpine)
No .dockerignore fileExclude node_modules, .git, .env, build artifacts
Using npm install instead of npm cinpm ci for deterministic, lockfile-based installs
HEALTHCHECK missingAdd health check for orchestrator integration
Large base images (node:24)Use alpine variants (node:24-alpine) for smaller images
Ignoring .env file precedence in Composeenvironment: in Compose overrides .env file values
Building entire monorepo for one serviceUse turbo prune --docker for minimal build context
No layer caching in CIUse cache-from/cache-to with GHA or registry backend
Building only for x86 when deploying to ARMUse docker buildx with --platform linux/amd64,linux/arm64

Delegation

  • Dockerfile review: Use Task agent to audit Dockerfiles for size, security, and caching
  • Compose exploration: Use Explore agent to discover existing Docker configurations
  • Architecture decisions: Use Plan agent for container orchestration strategy
If the ci-cd-architecture skill is available, delegate CI/CD pipeline and deployment strategy to it. If the application-security skill is available, delegate container security scanning and hardening review to it.

References

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.45%
按下载量换算110

Claude

30.49%
按下载量换算94

Cursor

17.06%
按下载量换算53

Gemini CLI

9.41%
按下载量换算29

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

来源信息

继续浏览同类 Skills