docker

docker is a skill for Claude Code, Codex from kok-o/contextos-agents. It costs 23 tokens per session (1,510 once invoked), scanned A, original, Apache-2.0.

A set of guidance for using Docker, a tool that packages an application and its dependencies into isolated containers. It covers Dockerfiles, multi-stage builds, image caching, container security, and Docker Compose.

In plain words
What is it for?
Use it when creating or reviewing Dockerfiles, Compose configurations, container builds in CI, or production container deployments.
Why use it?
It helps produce smaller, safer, more repeatable containers and avoids common mistakes such as running production containers as root or storing secrets in images.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static.

Good fit Use it when creating or reviewing Dockerfiles, Compose configurations, container builds in CI, or production container deployments.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/kok-o/contextos-agents
agentmods
npx agentmods add skills/kok-o/contextos-agents/docker

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for docker

README.md
[![agentmods](https://agentmods.dev/badge/skills/kok-o/contextos-agents/docker/github.svg)](https://agentmods.dev/skills/kok-o/contextos-agents/docker)
Your own site
<a href="https://agentmods.dev/skills/kok-o/contextos-agents/docker"><img src="https://agentmods.dev/badge/skills/kok-o/contextos-agents/docker/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for docker

Your own site · 80×15
<a href="https://agentmods.dev/skills/kok-o/contextos-agents/docker"><img src="https://agentmods.dev/badge/skills/kok-o/contextos-agents/docker.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,510 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00023 $0.01510
Opus 5.5 $0.00009 $0.00604
Sonnet 5.5 $0.00005 $0.00302
Haiku 4.5 $0.00002 $0.00151

Measured today against content hash 0032f0380baf, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

docker scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:3000/api/health || exit 1
catalog/skills/docker/SKILL.md · 170 lines

How it starts

The opening of the file, as written. The whole thing — 170 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Docker

Overview

Containerization, Dockerfile architecture, multi-stage compilation, security hardening, and container orchestration for production workloads.

When to Use

Activate when creating or optimizing Dockerfiles, docker-compose configurations, container security audits, CI/CD container build stages, or production container deployments.

Rules & Patterns

Negative Constraints (What NOT to Do)

  1. NEVER run containers as root in production: Always create and switch to an unprivileged non-root user (e.g. USER node or USER nonroot).
  2. NEVER use the latest tag: Always pin base images to specific immutable version digests or explicit minor tags (e.g. node:22-alpine3.20 or python:3.12-slim-bookworm).
  3. NEVER copy source code before dependency manifests: Always copy package manifests (package.json, pnpm-lock.yaml, pyproject.toml) and install dependencies first to maximize Docker layer cache hits.
  4. NEVER bake secrets, API keys, or .env files into image layers: Pass secrets via build-time secret mounts (--mount=type=secret) or runtime environment variables injected by the orchestrator.
  5. NEVER include build tools or devDependencies in the final runner image: Always use multi-stage builds to discard compilers, package managers, and temporary build caches from production images.
  6. NEVER run without a .dockerignore file: Always exclude .git, node_modules, .env*, and build outputs from the Docker build context.

Pattern 1: Node.js / Next.js Standalone Multi-Stage Dockerfile

Optimized multi-stage build producing minimal production images (<120MB) with non-root security:

# ── Stage 1: Dependencies ─────────────────────────────────────────────
FROM node:22-alpine3.20 AS deps
RUN apk add --no-cache libc6-compat
WORKDIR /app

COPY package.json pnpm-lock.yaml* package-lock.json* yarn.lock* ./
RUN \
  if [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \
  elif [ -f package-lock.json ]; then npm ci; \
  else yarn --frozen-lockfile; \
  fi

# ── Stage 2: Builder ──────────────────────────────────────────────────
FROM node:22-alpine3.20 AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .

ENV NEXT_TELEMETRY_DISABLED=1
ENV NODE_ENV=production
RUN npm run build

# ── Stage 3: Production Runner ────────────────────────────────────────
FROM node:22-alpine3.20 AS runner
WORKDIR /app

ENV NODE_ENV=production
ENV PORT=3000
ENV HOSTNAME="0.0.0.0"

RUN addgroup --system --gid 1001 nodejs && \
    adduser --system --uid 1001 nextjs

# Copy standalone output and static assets
COPY --from=builder /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static

USER nextjs
EXPOSE 3000

HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
  CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:3000/api/health || exit 1

CMD ["node", "server.js"]

Read the full file on GitHub · 170 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 170 lines · 23 tokens per session scan A 0032f0380baf

Subscribe to this mod's changes

docker is a skill published in the GitHub repository kok-o/contextos-agents (10 stars, last pushed today), licensed Apache-2.0. It adds 23 tokens to every session and 1,510 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-25.

Related

Other skills, from other repositories

harness

To build an AI harness: run, observe, validate, automate repeated work faster — CLI/MCP actions, devcontainers, skills, subagents, hooks, pipelines, automations.

griddynamics/rosetta · 40 tokens

kubestellar-console

Multi-cluster Kubernetes dashboard with AI-powered operations via MCP server and 10+ built-in agent skills.

aboalrejal-ai/skills · 25 tokens

kubernetes-expert

Expert Kubernetes: workloads, services, config, probes, resources, and troubleshooting. Trigger keywords: Kubernetes, k8s, Deployment, StatefulSet, Service, Pod, ConfigMap, Secret, Ingress, liveness, readiness, probe, requests, limits, HPA, kubectl, Helm, CrashLoopBackOff, ImagePullBackOff, OOMKilled. Use for writing…

Miaoge-Ge/coding-agent-skills · 93 tokens

docker-expert

Expert Docker: Dockerfiles, multi-stage builds, image size/cache optimization, Compose, and container best practices. Trigger keywords: Docker, Dockerfile, container, image, multi-stage, layer cache, docker-compose, .dockerignore, entrypoint, distroless, non-root, healthcheck, build context. Use for writing/optimizing…

Miaoge-Ge/coding-agent-skills · 86 tokens

ai-engineering-toolkit

6 production-ready AI engineering workflows: prompt evaluation (8-dimension scoring), context budget planning, RAG pipeline design, agent security audit (65-point checklist), eval harness building, and product sense coaching.

aboalrejal-ai/skills · 47 tokens

hosted-agents-v2-py

Build hosted agents using Azure AI Projects SDK with ImageBasedHostedAgentDefinition. Use when creating container-based agents in Azure AI Foundry.

aboalrejal-ai/skills · 36 tokens