跳到正文
cccskills
免费在 GitHub 公开

docker-setup

Docker setup: Dockerfile best practices, multi-stage, compose, security, size optimization.

中文简介正在准备中。当前显示原文说明。

SebastianLuser/claude-code-arcane星标 3(GitHub 3 + cccskills 0)
集成工具Docker

实测评分 未实测

查看安装方法

包含的文件(5)

  • SKILL.md3.7 KB
  • references/anti-patterns.md560 B
  • references/checklists.md2.4 KB
  • references/compose-and-debugging.md2.8 KB
  • references/size-optimization.md322 B

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

docker-setup — Docker & Compose Setup

Quick Start Checklist — Setup completo desde cero

  • .dockerignore creado antes de cualquier COPY (excluye .git, node_modules, .env, coverage, *.md)
  • Dockerfile multi-stage: stage builder separado del stage runtime
  • Base image con tag fijo, nunca :latest (ej: golang:1.22-alpine, node:20-alpine)
  • Dependencias copiadas e instaladas ANTES del código fuente (cache de layers)
  • Stage runtime usa imagen mínima: distroless (Go) o node:20-alpine (TS) o nginx:alpine (React)
  • USER nonroot o usuario no-root en stage runtime
  • HEALTHCHECK presente en cada servicio
  • Signal handler: tini/dumb-init en Node (Go nativo); CMD con exec form
  • docker-compose.yml con depends_on: condition: service_healthy
  • docker-compose.override.yml para dev-only (volúmenes, puertos) — no commiteado a prod
  • Secrets nunca en ENV ni en build args — solo via env vars en runtime o mounts
  • trivy image o docker scout en CI antes de push al registry
  • Runtime endurecido: read_only, cap_drop: [ALL], no-new-privileges, límites de memoria y PIDs (ver references/checklists.md)

Generate production-ready Dockerfiles and docker-compose for Go, TypeScript, and React stacks.

Principles

  1. Multi-stage builds — build != runtime. Final image is lean.
  2. Non-root user — never run as root in runtime stage
  3. Minimal base — distroless or alpine for runtime
  4. .dockerignore — exclude node_modules, .env, .git from build context
  5. Layer caching — copy dependency files before source code
  6. Health checks on all services
  7. Secrets via env vars / mounts — never in Dockerfile or image layers

Discovery questions

  1. Stack: Go / TS (Fastify/Express) / React+Vite / monorepo
  2. External services: Postgres / Redis / Kafka / others
  3. Target: dev local only / prod only / both
  4. Registry: GHCR / ECR / GCR
  5. Deploy target: K8s / ECS / Cloud Run

Base image selection

StackBuild stageRuntime stage
Gogolang:<version>-alpinegcr.io/distroless/static-debian12:nonroot
Node/TSnode:<version>-alpinenode:<version>-alpine + dumb-init/tini
React (static)node:<version>-alpinenginx:<version>-alpine

Dockerfile best practices checklist

→ Read references/checklists.md for Dockerfile best practices (10 items), security checklist (8 items), runtime hardening, and health check patterns

Compose decisions

ConcernDevProd
Build targetbuilder stage (for hot reload)runtime stage
VolumesSource mounted for live reloadNone (baked in)
Env vars.env file, LOG_LEVEL=debugInjected by orchestrator
PortsExposed to hostInternal only (behind LB)
Depends_oncondition: service_healthyManaged by orchestrator

Use docker-compose.override.yml for dev-only settings (auto-applied, not committed to prod).

→ Read references/compose-and-debugging.md for multiple compose files and config, profiles, watch mode, multi-platform builds, and a debugging table (exit codes, healthchecks, networking, volumes, disk)

Size optimization

→ Read references/size-optimization.md for image size reduction techniques

Anti-patterns

→ Read references/anti-patterns.md for 8 common Docker anti-patterns

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Plan, design, and implement A/B tests and experiments with statistical rigor. Covers hypothesis frameworks, sample sizing, metrics, and result analysis.

中文简介正在准备中。当前显示原文说明。

SebastianLuser/claude-code-arcane32026年10月27日 更新

Web/mobile accessibility decision guide: WCAG 2.2 AA, ARIA, keyboard nav, focus management, contrast, testing. Use for: a11y, accessibility, wcag, aria, screen reader, keyboard, contrast.

中文简介正在准备中。当前显示原文说明。

SebastianLuser/claude-code-arcane32026年10月27日 更新

Generate, iterate, and scale ad creative for paid advertising across Google, Meta, LinkedIn, and X. Covers platform specs, creative frameworks, and quality validation.

中文简介正在准备中。当前显示原文说明。

SebastianLuser/claude-code-arcane32026年10月27日 更新

Musica interactiva para juegos: layering vertical, re-secuenciacion horizontal, stingers, reglas de transicion con sync points, y mapeo de estados de gameplay a musica. Usar para: musica adaptativa, sistema de musica dinamica, transiciones musicales, combat music.

中文简介正在准备中。当前显示原文说明。

SebastianLuser/claude-code-arcane32026年10月27日 更新

Design multi-agent systems, create agent architectures, define communication patterns, and build autonomous agent workflows with structured evaluation frameworks.

中文简介正在准备中。当前显示原文说明。

SebastianLuser/claude-code-arcane32026年10月27日 更新

Inter-agent communication protocol for C-suite agent teams. Defines invocation syntax, loop prevention, isolation rules, response formats, and quality loops.

中文简介正在准备中。当前显示原文说明。

SebastianLuser/claude-code-arcane32026年10月27日 更新

查看 SebastianLuser 的全部技能

报告此技能的问题