docker
Docker containerization with Dockerfile, Compose, and multi-stage builds. Use for containers.
Best use case
docker is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Docker containerization with Dockerfile, Compose, and multi-stage builds. Use for containers.
Teams using docker should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/docker/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How docker Compares
| Feature / Agent | docker | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Docker containerization with Dockerfile, Compose, and multi-stage builds. Use for containers.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Docker Docker standardizes software delivery by packaging apps into containers. In 2025, Docker emphasizes **BuildKit** for high-performance builds and **Docker Scout** for supply chain security. ## When to Use - **Local Development**: Replicate production environments locally (`docker compose`). - **CI/CD**: Standard unit of deployment for 99% of modern pipelines. - **Legacy Migration**: Wrap old apps in containers to extend their life. ## Quick Start (BuildKit) ```dockerfile # syntax=docker/dockerfile:1 FROM node:22-alpine AS base WORKDIR /app COPY package*.json ./ FROM base AS deps RUN npm ci FROM base AS release COPY --from=deps /app/node_modules ./node_modules COPY . . CMD ["node", "index.js"] ``` ## Core Concepts ### BuildKit The modern build engine (default in 2025). Features concurrent build steps, secret mounting, and cache exports. `DOCKER_BUILDKIT=1 docker build .` ### Multi-stage Builds Keep images tiny by separating "build" environment (compilers, SDKs) from "runtime" environment (minimal OS). ### Docker Compose Define multi-container apps. `docker compose up -d --watch` (New `watch` mode syncs files continuously). ## Best Practices (2025) **Do**: - **Use `docker init`**: Generates best-practice Dockerfiles and .dockerignore for your language. - **Use Distroless / Alpine**: Minimize attack surface. - **Scan with Docker Scout**: Check for CVEs early in the pipeline. **Don't**: - **Don't run as Root**: Use `USER node` or create a specific user in the Dockerfile. - **Don't leak secrets**: Use `--mount=type=secret` during build, never `COPY .env`. ## References - [Docker Documentation](https://docs.docker.com/)
Related Skills
docker-desktop
Docker Desktop for Mac/Windows. Use for local containers.
template
Expert [skill-name] assistance covering [feature 1], [feature 2], and [feature 3]. Use when [working with X], [debugging Y], or [implementing Z].
zsh
Zsh shell with oh-my-zsh. Use for terminal shell.
zed
Zed high-performance collaborative editor. Use for fast editing.
xcode
Xcode Apple development IDE with simulators. Use for iOS/macOS development.
webstorm
WebStorm JavaScript IDE with debugging. Use for web development.
webpack
Webpack module bundler with loaders and plugins. Use for bundling.
warp
Warp modern terminal with AI. Use for terminal work.
vscode
Visual Studio Code editor with extensions and debugging. Use for code editing.
vite
Vite fast build tool with HMR. Use for modern frontend builds.
visual-studio
Visual Studio IDE for Windows with debugging and profiling. Use for .NET development.
vim
Vim text editor with motions, macros, and plugins. Use for terminal editing.