MR
Mayur Rathi
@github
⭐ 34.1k GitHub stars

Containerize-Aspnetcore

Containerize-Aspnetcore是一款code方向的AI技能,核心价值是Containerize an ASP,可用于解决开发者在code领域的实际问题,帮助用户提升效率、自动化重复任务或优化工作流。

Containerize an ASP.NET Core project by creating Dockerfile and .dockerfile files customized for the project.

Last verified on: 2026-05-30
mkdir -p ./skills/containerize-aspnetcore && curl -sfL https://raw.githubusercontent.com/github/awesome-copilot/main/skills/containerize-aspnetcore/SKILL.md -o ./skills/containerize-aspnetcore/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

# 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:

- `[8.0 or 9.0 (Default 8.0)]`


3. Linux distribution to use:

- `[debian, alpine, ubuntu, chiseled, or Azure Linux (mariner) (Default debian)]`


4. Custom base image for the build stage of the Docker image ("None" to use standard Microsoft base image):

- `[Specify base image to use for build stage (Default None)]`


5. Custom base image for the run stage of the Docker image ("None" to use standard Microsoft base image):

- `[Specify base image to use for run stage (Default None)]`


Container Configuration

1. Ports that must be exposed in the container image:

- Primary HTTP port: `[e.g., 8080]`

- Additional ports: `[List any additional ports, or "None"]`


2. User account the container should run as:

- `[User account, or default to "$APP_UID"]`


3. Application URL configuration:

- `[Specify ASPNETCORE_URLS, or default to "http://+:8080"]`


Build configuration

1. Custom build steps that must be performed before building the container image:

- `[List any specific build steps, or "None"]`


2. Custom build steps that must be performed after building the container image:

- `[List any specific build steps, or "None"]`


3. NuGet package sources that must be configured:

- `[List any private NuGet feeds with authentication details, or "None"]`


Dependencies

1. System packages that must be installed in the container image:

- `[Package names for the chosen Linux distribution, or "None"]`


2. Native libraries that must be copied to the container image:

- `[Library names and paths, or "None"]`


3. Additional .NET tools that must be installed:

- `[Tool names and versions, or "None"]`


System Configuration

1. Environment variables that must be set in the container image:

- `[Variable names and values, or "Use defaults"]`


File System

1. Files/directories that need to be copied to the container image:

- `[Paths relative to project root, or "None"]`

- Target location in container: `[Container paths, or "Not applicable"]`


2. Files/directories to exclude from containerization:

- `[Paths to exclude, or "None"]`


3. Volume mount points that should be configured:

- `[Volume paths for persistent data, or "None"]`


.dockerignore Configuration

1. Patterns to include in the `.dockerignore` file (.dockerignore will already have common defaults; these are additional patterns):

- Additional patterns: `[List any additional patterns, or "None"]`


Health Check Configuration

1. Health check endpoint:

- `[Health check URL path, or "None"]`


2. Health check interval and timeout:

- `[Interval and timeout values, or "Use defaults"]`


Additional Instructions

1. Other instructions that must be followed to containerize the project:

- `[Specific requirements, or "None"]`


2. Known issues to address:

- `[Describe any known

🎯 Best For

  • Claude users
  • GitHub Copilot users
  • Software engineers
  • Development teams
  • Tech leads

💡 Use Cases

  • Code quality improvement
  • Best practice enforcement

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude or GitHub Copilot and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply Containerize-Aspnetcore to Your Work

    Open your project in the AI assistant and ask it to apply the skill. Start with a small module to verify the output quality.

  4. 4

    Review and Refine

    Review AI suggestions before committing. Run tests, check for regressions, and iterate on the skill output.

❓ Frequently Asked Questions

Is Containerize-Aspnetcore compatible with Cursor and VS Code?

Yes — this skill works with any AI coding assistant including Cursor, VS Code with Copilot, and JetBrains IDEs.

Do I need specific dependencies for Containerize-Aspnetcore?

Check the install command and Works With section. Most code skills only require the AI assistant and your codebase.

How do I install Containerize-Aspnetcore?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/containerize-aspnetcore/SKILL.md, ready to use.

Can I customize this skill for my team?

Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.

⚠️ Common Mistakes to Avoid

Skipping validation

Always test AI-generated code changes, even for simple refactors.

Missing dependency updates

Check if the skill requires updated dependencies or new packages.

🔗 Related Skills