Tooluck logoTooluck
SKILL.md

sdk-container-publishing

Agent skill fromAaronontheweb/dotnet-skills

Publish .NET services as container images with the built-in SDK tooling (dotnet publish /t:PublishContainer, Microsoft.NET.Build.Containers) - no Dockerfile required. Covers the MSBuild property surface, base-image inference, self-contained and AOT implications, and CI/CD publishing.

How to install sdk-container-publishing

install sdk-container-publishing
# install the dotnet-skills pack with the skills CLI
npx skills add Aaronontheweb/dotnet-skills

# or add only this skill to Claude Code: copy the folder

skills/sdk-container-publishing/

# into

~/.claude/skills/sdk-container-publishing/ (all projects)

.claude/skills/sdk-container-publishing/ (one project)

skills/sdk-container-publishing/SKILL.md

MITFull file
1# .NET SDK Container Publishing
2
3## When to Use This Skill
4
5Use this skill when:
6- You want a container image for a .NET service and do not want to hand-write a Dockerfile
7- You want to know how to tag, name, or expose ports on an SDK-built image without a Dockerfile
8- You are wiring container publishing into CI / CD or a release pipeline
9- An SDK-built image pushes to the wrong registry, gets the wrong tag, or picks the wrong base image
10- You need a tarball of an image for scanning or air-gapped loading
11
12Do not use it when:
13- You need a `RUN` step or arbitrary layer customization in the image. The SDK tooling cannot emulate `RUN`; write a Dockerfile instead.
14
15## What This Is
16
17Since .NET 7, `dotnet publish` builds a container image natively. The `Microsoft.NET.Build.Containers` tooling ships with the SDK, so no Dockerfile is required and no Docker install is needed to produce an image. Docker or Podman is only required to run the image locally. This is documented in the [containerize with dotnet publish tutorial](https://learn.microsoft.com/en-us/dotnet/core/containers/sdk-publish).
18
19The quickest path is one command:
20
21```bash
22dotnet publish /t:PublishContainer -c Release
23```
24…

Excerpt shown under the repository's MIT license.

More skills in dotnet-skills

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates