docker-essentials

docker-essentials is a skill for Claude Code, Codex from asgarovf/locusai. It costs 35 tokens per session (1,148 once invoked), scanned A, original, MIT.

Guidance for packaging applications in Docker containers and running related containers together. A container bundles an application with the files and settings it needs to run consistently.

In plain words
What is it for?
Writing Dockerfiles, creating Docker Compose setups, building development environments, debugging containers, and reducing image size and build time.
Why use it?
It helps applications behave more predictably across development, testing, and deployment, while addressing slow builds, oversized images, and common container setup problems.

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/asgarovf/locusai/docker-essentials
Any agent
npx skills add asgarovf/locusai --skill docker-essentials
Clone the repo
git clone --depth 1 https://github.com/asgarovf/locusai

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-essentials

README.md
[![agentmods](https://agentmods.dev/badge/skills/asgarovf/locusai/docker-essentials.svg)](https://agentmods.dev/skills/asgarovf/locusai/docker-essentials)
Your own site
<a href="https://agentmods.dev/skills/asgarovf/locusai/docker-essentials"><img src="https://agentmods.dev/badge/skills/asgarovf/locusai/docker-essentials.svg" alt="Measured on agentmods" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,148 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.00035 $0.01148
Opus 5 $0.00017 $0.00574
Sonnet 5 $0.00007 $0.00230
Haiku 4.5 $0.00003 $0.00115

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

Security

Grade A, and why

docker-essentials 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.

test: ["CMD", "curl", "-f", "http://localhost:3000/health"]
skills/docker-essentials/SKILL.md · 201 lines

How it starts

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

Docker Essentials

When to use this skill

  • Writing or optimizing a Dockerfile
  • Creating docker-compose configurations
  • Containerizing an application
  • Setting up multi-container development environments
  • Debugging container issues
  • Optimizing Docker image size and build times

Dockerfile best practices

Multi-stage builds

# Stage 1: Build
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build

# Stage 2: Production
FROM node:20-alpine AS production
WORKDIR /app
RUN addgroup -g 1001 appgroup && adduser -u 1001 -G appgroup -s /bin/sh -D appuser
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./
USER appuser
EXPOSE 3000
CMD ["node", "dist/index.js"]

Layer optimization

# GOOD: Copy dependency files first for cache
COPY package.json package-lock.json ./
RUN npm ci
COPY . .

# BAD: Busts cache on any source change
COPY . .
RUN npm install

Security

  • Use specific image tags, not latest
  • Run as non-root user
  • Use .dockerignore to exclude secrets, node_modules, .git
  • Don't store secrets in ENV — use build secrets or runtime mounts
  • Scan images: docker scout cves <image>

.dockerignore

node_modules
.git
.env*
dist
*.log
.DS_Store
coverage
.nyc_output

Docker Compose

Development setup

services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
      target: development
    ports:
      - "3000:3000"
    volumes:
      - .:/app
      - /app/node_modules
    environment:
      - NODE_ENV=development
      - DATABASE_URL=postgres://user:pass@db:5432/mydb
    depends_on:
      db:
        condition: service_healthy

  db:
    image: postgres:16-alpine
    ports:
      - "5432:5432"
    environment:
      POSTGRES_USER: user
      POSTGRES_PASSWORD: pass
      POSTGRES_DB: mydb
    volumes:
      - pgdata:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U user"]
      interval: 5s
      timeout: 5s
      retries: 5

  redis:
    image: redis:7-alpine
    ports:
      - "6379:6379"

volumes:
  pgdata:

Read the full file on GitHub · 201 lines

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 · 201 lines · 35 tokens per session scan A fb96d5c3bbaf

Subscribe to this mod's changes

docker-essentials is a skill published in the GitHub repository asgarovf/locusai (23 stars, last pushed 5mo ago), licensed MIT. It adds 35 tokens to every session and 1,148 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.