docker

docker is a skill for Claude Code from codewithmukesh/dotnet-claude-kit. It costs 125 tokens per session (1,581 once invoked), scanned B, original, MIT.

A guide for containerizing .NET 10 applications with Docker, including multi-stage builds, non-root containers, health checks, and ignored files. Docker packages an application and its dependencies into a repeatable container.

In plain words
What is it for?
Use it when creating a Dockerfile, optimizing a .NET image, configuring Docker Compose for development, or preparing an application for orchestration.
Why use it?
It helps avoid oversized images, unnecessary root access, and unreliable container health checks.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is COPY src/**/*.csproj ./src/.

Part of the dotnet-claude-kit plugin — 51 skills, 11 agents, 2 hooks, 1 MCP server shipped together

not rated 853repo +5 26d ago B scan Socket: passSnyk: passSkillSpector: warn 125 tokens original MIT

Good fit Use it when creating a Dockerfile, optimizing a .NET image, configuring Docker Compose for development, or preparing an application for orchestration.

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/codewithmukesh/dotnet-claude-kit
agentmods
npx agentmods add skills/codewithmukesh/dotnet-claude-kit/docker

Made for: Claude Code.

Or install dotnet-claude-kit, the plugin that ships this one along with the rest of its 51 skills, 11 agents, 2 hooks, 1 MCP server.

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/codewithmukesh/dotnet-claude-kit/docker/github.svg)](https://agentmods.dev/skills/codewithmukesh/dotnet-claude-kit/docker)
Your own site
<a href="https://agentmods.dev/skills/codewithmukesh/dotnet-claude-kit/docker"><img src="https://agentmods.dev/badge/skills/codewithmukesh/dotnet-claude-kit/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/codewithmukesh/dotnet-claude-kit/docker"><img src="https://agentmods.dev/badge/skills/codewithmukesh/dotnet-claude-kit/docker.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 125 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,581 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 14 Sept 2026
  • Snyk pass 14 Sept 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Privilege Escalation · line 20
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 180
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
How audits are shown
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.00125 $0.01581
Opus 5.5 $0.00050 $0.00632
Sonnet 5.5 $0.00025 $0.00316
Haiku 4.5 $0.00013 $0.00158

Measured 3mo ago against content hash 6b5612ea7604, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

docker scanned grade B with 2 findings 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 3mo 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 rootmediumPrivilege escalation

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

2. **Non-root by default** — .NET container images support `USER app` by default since .NET 8. Never run as root in production.

Makes network callslowCapability

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

4. **Health probes at the orchestrator level** — Expose a `/health/live` endpoint and let Kubernetes/Compose probe it. Chiseled and default aspnet images have no shell or curl, so in-image `HEALTHCHECK` commands have not
skills/docker/SKILL.md · 206 lines

How it starts

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

Docker

Core Principles

  1. Multi-stage builds always — Separate build and runtime stages. Build in the SDK image, run in the ASP.NET runtime image.
  2. Non-root by default — .NET container images support USER app by default since .NET 8. Never run as root in production.
  3. Layer caching matters — Copy .csproj files and restore before copying source code. This caches NuGet dependencies across builds.
  4. Health probes at the orchestrator level — Expose a /health/live endpoint and let Kubernetes/Compose probe it. Chiseled and default aspnet images have no shell or curl, so in-image HEALTHCHECK commands have nothing to run with.

Patterns

Multi-Stage Dockerfile for Web API

# Stage 1: Build
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src

# Copy project files and restore (cached layer)
COPY ["src/MyApp.Api/MyApp.Api.csproj", "src/MyApp.Api/"]
COPY ["src/MyApp.Domain/MyApp.Domain.csproj", "src/MyApp.Domain/"]
COPY ["Directory.Build.props", "."]
COPY ["Directory.Packages.props", "."]
RUN dotnet restore "src/MyApp.Api/MyApp.Api.csproj"

# Copy everything and build
COPY . .
RUN dotnet publish "src/MyApp.Api/MyApp.Api.csproj" \
    -c Release \
    -o /app/publish \
    --no-restore

# Stage 2: Runtime
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS runtime
WORKDIR /app

# Non-root user (default in .NET 8+ images)
USER app

COPY --from=build /app/publish .

EXPOSE 8080

ENTRYPOINT ["dotnet", "MyApp.Api.dll"]

Container Health Probes

Prefer orchestrator-level probes (Kubernetes livenessProbe, Compose healthcheck) over a Dockerfile HEALTHCHECK — the standard aspnet and chiseled images ship no shell, no curl, and no wget, so there is nothing inside the container to run the probe with. Point the orchestrator at /health/live:

# docker-compose — probe from outside the app process
services:
  api:
    healthcheck:
      test: ["CMD-SHELL", "wget -qO- http://localhost:8080/health/live || exit 1"]
      interval: 30s
      timeout: 3s
      retries: 3
# Note: CMD-SHELL requires a shell + wget in the image. Use a non-chiseled
# variant for this, or better: let Kubernetes httpGet probes do it —
# they run from the kubelet, needing nothing inside the image.

Read the full file on GitHub · 206 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. 3mo ago First seen · 206 lines · 125 tokens per session scan B 6b5612ea7604

Subscribe to this mod's changes

docker is a skill published in the GitHub repository codewithmukesh/dotnet-claude-kit (853 stars, last pushed 26d ago), licensed MIT. It adds 125 tokens to every session and 1,581 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

docker compared with skills from other repositories

docker next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
dockercodewithmukesh/dotnet-claude-kitSkill85326d agoMITB125Claude Code
migrate-dotnet9-to-dotnet10F-U-S-E-E/FuseDevelopmentGroupSkill2314d agoAGPL-3.0A266Claude Code
containerize-aspnetcorefabioc-aloha/Alex_Skill_MallSkill65d agoMITC28Claude Code, Codex
containerize-aspnet-frameworkOKHP3/skillzSkill43d agoMITA30Claude Code, Codex
dotnet-containerswshaddix/dotnet-skillsSkill949mo agononeA28Claude Code
containerize-aspnetcoreOKHP3/skillzSkill43d agoMITC28Claude Code, Codex
agui-dotnet-streaming-chatag-ui-protocol/ag-uiSkill22ktodayMITA223Claude Code