containerize-aspnetcore

Installation
Summary

Generate Dockerfile and .dockerignore files customized for ASP.NET Core containerization.

  • Accepts configurable settings for .NET version, Linux distribution (Debian, Alpine, Ubuntu, Chiseled, Azure Linux), base images, ports, and environment variables
  • Creates multi-stage Dockerfile with SDK build stage and optimized runtime stage, following Microsoft best practices for .NET containerization
  • Generates .dockerignore file with sensible defaults (bin/, obj/, .git/, etc.) plus custom patterns, and supports health check configuration via HEALTHCHECK instruction
  • Handles dependencies including system packages, native libraries, additional .NET tools, NuGet feeds, and custom build steps before and after containerization
SKILL.md

ASP.NET Core Docker Containerization Prompt

Containerization Request

Containerize the ASP.NET Core (.NET) project specified in the settings below, focusing exclusively on changes required for the application to run in a Linux Docker container. Containerization should consider all settings specified here.

Abide by best practices for containerizing .NET Core applications, ensuring that the container is optimized for performance, security, and maintainability.

Containerization Settings

This section of the prompt contains the specific settings and configurations required for containerizing the ASP.NET Core application. Prior to running this prompt, ensure that the settings are filled out with the necessary information. Note that in many cases, only the first few settings are required. Later settings can be left as defaults if they do not apply to the project being containerized.

Any settings that are not specified will be set to default values. The default values are provided in [square brackets].

Basic Project Information

  1. Project to containerize:

    • [ProjectName (provide path to .csproj file)]
  2. .NET version to use:

Related skills

More from github/awesome-copilot

Installs
8.4K
GitHub Stars
32.7K
First Seen
Feb 25, 2026