Official agent skill

Docker Patterns

by langchain-ai in langchain-ai/skills-benchmarks

Best practices for Docker containerization and multi-stage builds

OfficialMITAuto-check passedDevOps & Cloud

Install Docker Patterns

skills CLI
$ npx skills add langchain-ai/skills-benchmarks --skill docker-patterns -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install langchain-ai/skills-benchmarks docker-patterns --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/langchain-ai/skills-benchmarks.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/noise/docker_patterns .claude/skills/docker-patterns && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
docker-patterns
GitHub stars
118
Token cost
~289 tokens
SKILL.md length
58 words
Files
1
Skills in repo
8
Repo updated
First seen
Licence
MIT

At a glance

Best practices for Docker containerization and multi-stage builds

  • Works in 4 steps: Never run as root - use USER directive → Use specific version tags, not latest → Scan images with docker scout or Trivy → …
  • Tasks that involve Containers
  • SKILL.md covers Multi-Stage Builds, Security Best Practices, Health Checks and Compose Patterns
  • Calls docker

What it does

Docker Patterns is an agent skill from langchain-ai/skills-benchmarks, published by the product's own GitHub organization. Best practices for Docker containerization and multi-stage builds

Its SKILL.md is about 290 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in DevOps & Cloud, covering Containers. It works with Docker. The licence is MIT.

When your agent uses it

  • Tasks that involve Containers

Example prompts

  • “/docker-patterns”

Requirements

  • Docker

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Never run as root - use USER directive
  2. Use specific version tags, not latest
  3. Scan images with docker scout or Trivy
  4. Use .dockerignore to exclude sensitive files

What it can do on your machine

Read from SKILL.md and the folder at commit 9195f8c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • docker

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use docker, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Docker Patterns loads about 289 tokens when it runs. Until then it costs about 20 tokens; SKILL.md has 58 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~20
When it runs · the whole SKILL.md, loaded when a task matches
~289

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from langchain-ai/skills-benchmarks at commit 9195f8c, republished under its MIT licence (© langchain-ai). 58 words, ~289 tokens.

Download SKILL.mdSave it as .claude/skills/docker-patterns/SKILL.md (or your agent's skills folder).
name
docker-patterns
description
Best practices for Docker containerization and multi-stage builds

Docker Containerization Patterns

Build efficient, secure Docker images using modern patterns.

Multi-Stage Builds

Always use multi-stage builds to minimize image size:

dockerfile
# Build stage
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production

# Production stage
FROM node:20-alpine
WORKDIR /app
COPY --from=builder /app/node_modules ./node_modules
COPY . .
USER node
CMD ["node", "server.js"]

Security Best Practices

  1. Never run as root - use USER directive
  2. Use specific version tags, not latest
  3. Scan images with docker scout or Trivy
  4. Use .dockerignore to exclude sensitive files

Health Checks

dockerfile
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
  CMD curl -f http://localhost:3000/health || exit 1

Compose Patterns

yaml
services:
  app:
    build:
      context: .
      target: production
    environment:
      - NODE_ENV=production
    deploy:
      resources:
        limits:
          memory: 512M

© langchain-ai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/noise/docker_patterns of langchain-ai/skills-benchmarks.

Open the folder on GitHubat commit 9195f8c

Compare with similar skills

Docker Patterns next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Docker Patterns compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Docker Patterns this skilllangchain-ai/skills-benchmarks118—~289Automated safety check: PassMIT
Iron Proxy Gateway for NanoClawnanocoai/nanoclaw31k—~4.6kAutomated safety check: NotesMIT
GreptimeDB Dev Docker ImageGreptimeTeam/greptimedb6.7k—~4kAutomated safety check: NotesApache-2.0
Senior DevOps Toolkitmaslennikov-ig/claude-code-orchestrator-kit2596 repos~1.1kAutomated safety check: NotesCustom licence
LangBot Deployment Guidelangbot-app/LangBot18k—~1.2kAutomated safety check: NotesApache-2.0
Build Openshell Mxc WindowsNVIDIA/OpenShell15k—~4.9kAutomated safety check: PassApache-2.0

Similar skills

  • Installs or refreshes Iron Proxy and its Iron Control web console for NanoClaw, with a local Docker setup, database, credentials and a human approval bridge.

    31k GitHub stars~4.6k tokensUpdated yesterday
    DevOps & CloudAuto-check: notes
  • GreptimeDB Dev Docker Image

    GreptimeTeam/greptimedb

    Packages a locally built GreptimeDB debug binary into a development-only Docker image for local-cluster testing, with an optional push to a dev registry.

    6.7k GitHub stars~4k tokensUpdated 3 days ago
    DevOps & CloudAuto-check: notes
  • Senior DevOps Toolkit

    maslennikov-ig/claude-code-orchestrator-kit

    Comprehensive DevOps skill for CI/CD, infrastructure automation, containerization, and cloud platforms (AWS, GCP, Azure). Includes pipeline setup…

    259 GitHub starsUsed in 6 repos~1.1k tokens
    DevOps & CloudAuto-check: notes
  • LangBot Deployment Guide

    langbot-app/LangBot

    Deploys and configures a LangBot instance with Docker Compose or Kubernetes, covering config.yaml, the Box sandbox runtime, the plugin runtime and the global API key.

    18k GitHub stars~1.2k tokensUpdated yesterday
    DevOps & CloudAuto-check: notes
  • Official

    Maintain and validate OpenShell's build-only Windows MSVC lane for x64 and ARM64.

    15k GitHub stars~4.9k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Omnigent Docker Compose Deploy

    omnigent-ai/omnigent

    Brings up the Omnigent server and Postgres as a Docker compose stack on any Docker host, and covers the Dockerfile's runtime and host build targets for extending it to a new platform.

    11k GitHub stars~1.3k tokensUpdated yesterday
    DevOps & CloudAuto-check: notes

More from langchain-ai/skills-benchmarks

All 8 skills in this repo
  • Framework Selection

    langchain-ai/skills-benchmarks

    Official

    INVOKE THIS SKILL at the START of any LangChain/LangGraph/Deep Agents project, before writing any agent code.

    118 GitHub stars~1.8k tokensUpdated 16 days ago
    Auto-check passed
  • Langchain Agents

    langchain-ai/skills-benchmarks

    Official

    Build LangChain agents with modern patterns. An agent skill from langchain-ai/skills-benchmarks.

    118 GitHub stars~2.5k tokensUpdated 16 days ago
    Auto-check passed
  • Langchain Oss Primer

    langchain-ai/skills-benchmarks

    Official

    ALWAYS START HERE for any LangChain, Deep Agents, or LangGraph agent building project.

    118 GitHub stars~4.1k tokensUpdated 16 days ago
    Auto-check passed
  • React Components

    langchain-ai/skills-benchmarks

    Official

    Modern React component patterns with hooks and TypeScript. An agent skill from langchain-ai/skills-benchmarks.

    118 GitHub stars~437 tokensUpdated 16 days ago
    Auto-check passed
  • Testing Patterns

    langchain-ai/skills-benchmarks

    Official

    Unit testing and integration testing best practices. An agent skill from langchain-ai/skills-benchmarks.

    118 GitHub stars~447 tokensUpdated 16 days ago
    Auto-check passed
  • API Docs

    langchain-ai/skills-benchmarks

    Official

    OpenAPI documentation and REST API design patterns. An agent skill from langchain-ai/skills-benchmarks.

    118 GitHub stars~358 tokensUpdated 16 days ago
    Auto-check passed

Works with

Categories

Questions about Docker Patterns

What does Docker Patterns do?

Best practices for Docker containerization and multi-stage builds. Docker Patterns is an agent skill from langchain-ai/skills-benchmarks, published by the product's own GitHub organization.

When should I use Docker Patterns?

Docker Patterns fits situations like: tasks that involve Containers.

How do I install Docker Patterns in Claude Code?

Run `npx skills add langchain-ai/skills-benchmarks --skill docker-patterns -a claude-code`. Or copy the skill folder (skills/noise/docker_patterns in langchain-ai/skills-benchmarks) into .claude/skills/docker-patterns in your project. Claude Code loads it when a task matches its description.

How do I install Docker Patterns in Codex?

Run `npx skills add langchain-ai/skills-benchmarks --skill docker-patterns -a codex`. Or copy the skill folder (skills/noise/docker_patterns in langchain-ai/skills-benchmarks) into .agents/skills/docker-patterns in your project. Codex loads it when a task matches its description.

Can I use Docker Patterns in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add langchain-ai/skills-benchmarks --skill docker-patterns -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/docker-patterns, .gemini/skills/docker-patterns, .github/skills/docker-patterns and .opencode/skills/docker-patterns in your project.

What does Docker Patterns need to run?

Going by SKILL.md and its folder, Docker Patterns needs the command-line tools its instructions call (docker). Our summary lists: Docker.

Does Docker Patterns access the network?

SKILL.md contains no URLs. Its commands use docker, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Docker Patterns safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Docker Patterns use?

Docker Patterns is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Docker Patterns use?

About 289 tokens (SKILL.md is roughly 1.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Docker Patterns?

Skills that share tags, products or a category with Docker Patterns: Iron Proxy Gateway for NanoClaw (nanocoai/nanoclaw, 31k stars), GreptimeDB Dev Docker Image (GreptimeTeam/greptimedb, 6.7k stars), Senior DevOps Toolkit (maslennikov-ig/claude-code-orchestrator-kit, 259 stars) and LangBot Deployment Guide (langbot-app/LangBot, 18k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Docker Patterns?

langchain-ai (a GitHub organization, an official publisher) maintains it in langchain-ai/skills-benchmarks, which has 118 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on September 21, 2026.

Source: langchain-ai/skills-benchmarks on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.