container-publish

Publish .NET 10 applications as OCI-compliant container images without a Dockerfile.

224|87|Updated Dec 15, 2018
One-click install
npx skills add https://github.com/Resgrid/Core --skill container-publish-resgrid
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: container-publish
Source: https://github.com/Resgrid/Core/tree/main/.opencode/skills/container-publish
Command: npx skills add https://github.com/Resgrid/Core --skill container-publish-resgrid

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the friction of containerizing .NET applications by avoiding Dockerfile authoring while still producing OCI-compliant images suitable for registry publishing and production deployments.

Core Features & Use Cases

  • No Dockerfile Required: Build container images directly via .NET 10 SDK publishing targets using dotnet publish /t:PublishContainer.
  • Production-Safe Image Selection: Use noble-chiseled and related chiseled families to reduce attack surface and shrink images.
  • Registry & Multi-Arch Publishing: Configure ContainerRepository, tags, and runtime identifiers to push the correct architectures to container registries.

Use Case: You want to ship an ASP.NET Core API to a registry in CI/CD with a small, hardened image and multiple architectures, while keeping all container configuration in the project file.

Quick Start

Run dotnet publish /t:PublishContainer --os linux --arch x64 to generate a container image directly from your project without writing a Dockerfile.

Frequently Asked Questions about container-publish

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

FAQPage Schema
How do I containerize a .NET application without a Dockerfile?

You can containerize a .NET application without a Dockerfile by using the .NET 10 SDK's PublishContainer MSBuild target. Running `dotnet publish /t:PublishContainer --os linux --arch x64` generates an OCI-compliant container image directly from your project file.

Can I push multi-architecture .NET container images directly to a registry?

Yes, you can push multi-architecture .NET container images directly to a registry. By configuring ContainerRepository, ContainerImageTags, and runtime identifiers in your project, the PublishContainer target handles building and pushing the correct architectures.

What are chiseled container images and how do I use them with .NET?

Chiseled container images, like the `noble-chiseled` family, reduce attack surface and shrink image size by removing unnecessary OS components. You can select them for your .NET application by setting the ContainerFamily MSBuild property in your project file.

Do I need Docker installed to build and publish .NET container images?

No, you do not need Docker installed to build and publish .NET container images. This dockerless approach uses the .NET 10 SDK's built-in PublishContainer MSBuild target to create OCI-compliant images and push them directly to a registry.

What MSBuild properties are required to configure .NET container publishing?

Required MSBuild properties for .NET container publishing include ContainerRepository, ContainerFamily, ContainerImageTags, and ContainerArchiveOutputPath. You must also enforce Linux targeting and configure proper authentication credentials before pushing to a registry.

How do I export a .NET container image as a local tar archive?

You can export a .NET container image as a local tar archive by setting the ContainerArchiveOutputPath MSBuild property during the publish process. This allows you to generate the OCI-compliant image locally without immediately pushing it to a remote registry.