container-publish

Builds OCI image containers for .NET apps without needing a Dockerfile.

1|Updated Mar 27, 2026
One-click install
npx skills add https://github.com/Maj3D10/Training-Platform --skill container-publish-maj3d10
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: container-publish
Source: https://github.com/Maj3D10/Training-Platform/tree/main/.agent/skills/container-publish
Command: npx skills add https://github.com/Maj3D10/Training-Platform --skill container-publish-maj3d10

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the problem of creating production-ready OCI containers for .NET apps without maintaining a Dockerfile, reducing setup time and configuration drift between code and container build steps.

Core Features & Use Cases

  • Dockerfile-less container builds: Uses the .NET SDK container publishing target (PublishContainer) to produce OCI-compliant images directly from your project.
  • Production-focused image variants: Supports chiseled/noble-chiseled images to reduce attack surface and shrink runtime footprint, including ICU variants.
  • Registry publishing and CI-friendly outputs: Publishes to registries via MSBuild properties (ContainerRegistry, ContainerRepository, tags) and supports tarball outputs for CI scanning without a Docker daemon.

Use case example: You need to ship a secure ASP.NET Core API image to GHCR from a CI pipeline, with deterministic tags (like the Git commit SHA) and a small production base (noble-chiseled), without writing or maintaining a Dockerfile.

Quick Start

Run dotnet publish /t:PublishContainer --os linux --arch x64 -p ContainerRepository=mycompany/myapp-api -p ContainerFamily=noble-chiseled -p ContainerRegistry=ghcr.io -p ContainerImageTag=1.0.0.

Frequently Asked Questions about container-publish

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build .NET OCI container images without a Dockerfile?

Yes, you can publish multi-arch .NET containers by setting the ContainerRuntimeIdentifiers MSBuild property. This configures the PublishContainer target to build images for multiple architectures, supporting broad deployment across different environments.

Can I push .NET containers to a registry from GitHub Actions CI?

You can push .NET containers to a registry from GitHub Actions CI by configuring the ContainerRegistry and ContainerRepository MSBuild properties during the PublishContainer target execution, enabling direct image pushes without a Docker daemon.

Does .NET SDK support publishing chiseled container images for production?

The .NET SDK supports publishing chiseled container images for production by setting the ContainerFamily MSBuild property to noble-chiseled. This reduces the runtime attack surface and shrinks the overall image footprint.

How do I output .NET container images as tarballs for CI scanning?

To output .NET container images as tarballs for CI scanning, specify the ContainerArchiveOutputPath MSBuild property. This generates a tarball output, allowing image scanning in CI pipelines without requiring a running Docker daemon.

What MSBuild properties configure runtime behavior for .NET container images?

MSBuild properties that configure runtime behavior for .NET container images include ContainerImageTags, ports, environment variables, and labels. These properties are applied during the PublishContainer target execution to customize the OCI image.