docker-agent

A guide for creating Dockerfiles and Docker Compose configurations and diagnosing container problems. Containers package an application with the files and tools it needs to run consistently.

In plain words
What is it for?
Use it when containerizing Python, Node.js, or Go applications, configuring multi-service environments, or optimizing Docker builds.
Why use it?
It helps set up local services, fix startup failures, and reduce unnecessary image size or runtime risk.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/chandrudp29/skillhub/docker-agent
Any agent
npx skills add chandrudp29/skillhub --skill docker-agent
Clone the repo
git clone --depth 1 https://github.com/chandrudp29/skillhub

Made for: Claude Code, Codex.

Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,345 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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 $0.00037 $0.01345
Opus 5 $0.00018 $0.00673
Sonnet 5 $0.00007 $0.00269
Haiku 4.5 $0.00004 $0.00135

Measured 3d ago against content hash 09a121adb52a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

docker-agent 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 3d ago.

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.

docker exec <api_container> curl http://db:5432
skills/docker-agent/SKILL.md · 194 lines

How it starts

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

Docker Agent

Production-ready Dockerfiles and compose configs. Fixes common container problems fast.

When to Use

  • "Write a Dockerfile for my Python/Node/Go app"
  • "My container won't start"
  • "Set up docker-compose for my local dev environment"
  • "My image is 2GB — help me reduce it"

Python Dockerfile (production-ready)

# Build stage — install dependencies separately for cache efficiency
FROM python:3.12-slim AS builder
WORKDIR /build

# Install build deps first (changes rarely — cached layer)
COPY requirements.txt .
RUN pip install --no-cache-dir --user -r requirements.txt

# Runtime stage — clean image without build tools
FROM python:3.12-slim AS runtime
WORKDIR /app

# Non-root user for security
RUN useradd --create-home appuser
USER appuser

# Copy installed packages from builder
COPY --from=builder /root/.local /home/appuser/.local
ENV PATH=/home/appuser/.local/bin:$PATH

# Copy app code last (changes most often — cache invalidated last)
COPY --chown=appuser:appuser . .

EXPOSE 8000
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]

Node.js Dockerfile

FROM node:20-alpine AS builder
WORKDIR /build
COPY package*.json .
RUN npm ci --only=production

FROM node:20-alpine AS runtime
WORKDIR /app
RUN adduser -D appuser
USER appuser
COPY --from=builder /build/node_modules ./node_modules
COPY --chown=appuser:appuser . .
EXPOSE 3000
CMD ["node", "server.js"]

docker-compose for Local Dev

# docker-compose.yml
services:
  api:
    build: .
    ports:
      - "8000:8000"
    environment:
      - DATABASE_URL=postgresql://postgres:password@db:5432/myapp
      - REDIS_URL=redis://redis:6379
    volumes:
      - .:/app          # hot reload in dev
    depends_on:
      db:
        condition: service_healthy
      redis:
        condition: service_started
    restart: unless-stopped

  db:
    image: postgres:16-alpine
    environment:
      POSTGRES_DB: myapp
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: password
    volumes:
      - postgres_data:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres"]
      interval: 5s
      timeout: 5s
      retries: 5

  redis:
    image: redis:7-alpine
    volumes:
      - redis_data:/data

volumes:
  postgres_data:
  redis_data:

Read the full file on GitHub · 194 lines

Files

What ships with it

1 file 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. 3d ago First seen · 194 lines · 37 tokens per session scan A 09a121adb52a

Subscribe to this mod's changes

docker-agent is a skill published in the GitHub repository chandrudp29/skillhub (13 stars, last pushed 2mo ago), licensed MIT. It adds 37 tokens to every session and 1,345 once invoked, about $0.0002 per session on Opus 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-08-30.

Related

Other skills, from other repositories

docker-docs

Comprehensive Docker 28.x reference covering all features: installation, Dockerfile instructions, multi-stage builds, Docker Compose, networking, volumes, CLI commands, image management, registries, security best practices, CI/CD integration, debugging, and Kubernetes migration. Use whenever the user mentions Docker…

pledgeandgrow/pledge-skills · 93 tokens

docker-essentials

Create and optimize Dockerfiles, docker-compose configurations, and container workflows. Use when containerizing applications, setting up development environments, or optimizing Docker builds.

asgarovf/locusai · 35 tokens

docker-management

Docker container lifecycle management, Dockerfile authoring, and debugging.

furkangonel/cowrangler · 16 tokens

docker-wizard

Generate optimized Dockerfiles and docker-compose.yml with best practices and multi-stage builds.

glincker/claude-code-marketplace · 19 tokens

new-service

Add a new service to Harbor — scaffold the compose config, environment variables, metadata, documentation, and cross-service integrations. Use this skill whenever the user wants to add a new service to Harbor, integrate a new tool/app/model server, create a compose configuration for a new project, or onboard any…

av/harbor · 139 tokens

harbor

CLI toolkit for managing containerized LLM services. Use when the user wants to start, stop, configure, or manage AI/LLM services like Ollama, Open WebUI, llama.cpp, vLLM, LiteLLM, ComfyUI, and 250+ others. Triggers on requests to "run a model", "start ollama", "set up an LLM", "configure harbor", "manage services"…

av/harbor · 114 tokens