dotnet-containers

Generates SpriteAtlas-compatible PNGs and a JSON index from a set of input images.

1|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/rudironsoni/dotnet-agent-harness --skill dotnet-containers-rudironsoni
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-containers
Source: https://github.com/rudironsoni/dotnet-agent-harness/tree/main/.rulesync/skills/dotnet-containers
Command: npx skills add https://github.com/rudironsoni/dotnet-agent-harness --skill dotnet-containers-rudironsoni

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides guidance on containerizing .NET applications, enabling efficient deployment and management in containerized environments.

Core Features & Use Cases

  • Multi-stage Dockerfiles: Learn best practices for creating minimal and secure Docker images.
  • dotnet publish Container Images: Utilize the built-in .NET 8+ feature for direct container image creation.
  • Rootless Containers: Configure containers to run as non-root users for enhanced security.
  • Use Case: You need to deploy your ASP.NET Core application to a containerized environment. This Skill will guide you through creating an optimized Dockerfile and building a secure, minimal container image.

Quick Start

Use the dotnet-containers skill to create a multi-stage Dockerfile for your ASP.NET Core application.

Frequently Asked Questions about dotnet-containers

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

FAQPage Schema
How do I containerize an ASP.NET Core application using a multi-stage Dockerfile?

Containerize ASP.NET Core applications by creating a multi-stage Dockerfile that separates the SDK build environment from the minimal runtime base image. This approach optimizes layer caching and yields a secure, minimal Docker image for deployment.

Can I build a Docker image directly with dotnet publish without a Dockerfile?

Yes, the dotnet publish container image feature in .NET 8+ allows you to generate a container image directly without a Dockerfile. This built-in mechanism packages your ASP.NET Core or worker service output into an image efficiently.

How do I configure a .NET container to run as a non-root user?

Configure rootless .NET containers by setting the appropriate user context in your Dockerfile or dotnet publish settings. Running the container as a non-root user enhances security by minimizing process privileges inside the containerized environment.

What is the best way to optimize Docker layer caching for .NET apps?

Optimize Docker layer caching for .NET apps by structuring your multi-stage Dockerfile to restore NuGet packages and copy project files before copying the source code. This ensures dependency layers are cached and reused across builds.

Does this containerization guidance apply to .NET console applications and worker services?

Yes, the containerization guidance covers best practices for ASP.NET Core, console applications, and worker services. It addresses base image selection and configuration to ensure minimal and secure Docker images across different .NET project types.

Why should I choose a minimal base image for my .NET Docker container?

Choosing a minimal base image for your .NET Docker container reduces the final image size and limits the attack surface. Selecting an optimized base image is a key best practice for building secure and efficient containerized deployments.