docker

docker is a skill for Claude Code, Codex from SumonMSelim/agentguard. It costs 0 tokens per session (819 once invoked), scanned A, original, MIT.

A set of guidelines for writing and reviewing Dockerfiles and Docker Compose files. Docker packages an application and its dependencies into a container so it can run consistently across environments.

In plain words
What is it for?
Use it when creating or reviewing container images, Compose setups, build processes, runtime permissions, dependency caching, and image hardening.
Why use it?
It helps reduce image security risks, inefficient builds, oversized runtime images, and unsafe container settings.

Skill for Claude CodeCodex

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

Good fit Use it when creating or reviewing container images, Compose setups, build processes, runtime permissions, dependency caching, and image hardening.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sumonmselim/agentguard/docker
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.

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

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/sumonmselim/agentguard/docker/github.svg)](https://agentmods.dev/skills/sumonmselim/agentguard/docker)
Your own site
<a href="https://agentmods.dev/skills/sumonmselim/agentguard/docker"><img src="https://agentmods.dev/badge/skills/sumonmselim/agentguard/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/sumonmselim/agentguard/docker"><img src="https://agentmods.dev/badge/skills/sumonmselim/agentguard/docker.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 819 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.00000 $0.00819
Opus 5.5 $0.00000 $0.00328
Sonnet 5.5 $0.00000 $0.00164
Haiku 4.5 $0.00000 $0.00082

Measured 1mo ago against content hash 462f04203e97, 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 1mo 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.

Asks for rootlowPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- Never run as root. Prefer images with built-in non-root user: distroless `nonroot`, `node` user in Node images, `nobody` in Alpine. Otherwise add non-root user and switch: `USER appuser`

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

skills/docker/SKILL.md · 59 lines

How it starts

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

Docker

Image security

  • Never run as root. Prefer images with built-in non-root user: distroless nonroot, node user in Node images, nobody in Alpine. Otherwise add non-root user and switch: USER appuser
  • Minimal base: distroless, alpine, or official slim variants
  • Pin by digest or immutable tag. Never FROM node:latest or image: myapp:latest in Compose
  • Multi-stage builds: build in full image, copy only artifact to minimal runtime image
  • No build tools in final image
  • Scan with Trivy or Grype in CI. Fail on critical/high CVEs
  • Multi-arch: build with --platform linux/amd64,linux/arm64 for cross-platform targets

Dockerfile

  • One process per container
  • Enable BuildKit: DOCKER_BUILDKIT=1. Use --mount=type=cache for dependency caches, --mount=type=secret for build-time secrets
  • COPY specific files. Avoid COPY . . when targeted copy suffices
  • Layer order: least → most frequently changed. COPY package.json before COPY src/
  • .dockerignore: exclude .git, node_modules, test files, secrets, .env
  • Explicit WORKDIR. No implicit root working dir
  • ENTRYPOINT for executable, CMD for default args
  • No secrets in ENV, ARG, or RUN — persist in layer history. Use --mount=type=secret
  • HEALTHCHECK on all long-running services

Runtime

  • Read-only root filesystem where possible: --read-only
  • Drop all capabilities, re-add only what's needed: --cap-drop ALL --cap-add NET_BIND_SERVICE
  • No --privileged in production
  • Set resource limits: --memory, --cpus
  • Named volumes for persistent data. No bind mounts in production
  • No secrets via env vars. Use Docker secrets or mounted secret files
  • Log rotation: set --log-opt max-size=10m --log-opt max-file=3. Unbounded logs fill disks

Compose

  • compose.yml for local dev only. Production: Kubernetes, ECS, or equivalent
  • Explicit dependencies: depends_on + condition: service_healthy
  • Named volumes for persistent data. Never rely on container filesystem
  • env_file for local config. Never commit .env with real secrets
  • restart: unless-stopped for crash-resilient services
  • Custom networks per service group. Avoid default bridge
  • profiles: for optional services (e.g. debug tools, mock servers). Keep default startup lean

Read the full file on GitHub · 59 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. 1mo ago First seen · 59 lines · 0 tokens per session scan A 462f04203e97

Subscribe to this mod's changes

docker is a skill published in the GitHub repository SumonMSelim/agentguard (54 stars, last pushed 14d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 819 tokens. A static security scan graded it A with 1 finding (asks for root). 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

metago-container-expert

Containerization Expert - specializes in Dockerfile, multi-arch builds, image optimization, vulnerability scanning, and registry publishing.

metago-ai/metagolifeform · 29 tokens

ascend-docker

Create Docker containers for Huawei Ascend NPU development with proper device mappings and volume mounts. Use when setting up Ascend development environments in Docker, running CANN applications in containers, or creating isolated NPU development workspaces. Supports privileged mode (default), basic mode, and full…

ascend-ai-coding/awesome-ascend-skills · 76 tokens

external-gitcode-ascend-cann-nnal-installer

An installer for the full CANN software stack: Toolkit, Kernels, and NNAL for Ascend NPUs. It can install downloaded packages or extract them from a Docker image.

ascend-ai-coding/awesome-ascend-skills · 87 tokens

docker-best-practices

A guide to writing Dockerfiles and building containers, which package an application with what it needs to run. It covers smaller images, faster rebuilds, fixed base versions, safer users, and keeping secrets out.

Wade-DevCode/awesome-coding-skills-cn · 29 tokens

docker-cn

A guide for configuring Docker image mirrors in mainland China, where access to Docker Hub can be unreliable. Docker image mirrors are alternate registries that cache or serve container images.

guyulong/cn-agent-skills · 20 tokens

ascend-docker

Create Docker containers for Huawei Ascend NPU development with proper device mappings and volume mounts. Use when setting up Ascend development environments in Docker, running CANN applications in containers, or creating isolated NPU development workspaces. Supports privileged mode (default), basic mode, and full…

Ascend/agent-skills · 76 tokens