Перейти к содержанию
Skillpedia
Деплой и облако (DevOps)40k · #7116

containerize-aspnet-framework

Что он делает

Этот инструмент создает необходимые инструкции (они называются Dockerfile), которые превращают проект ASP.NET .NET Framework в контейнер. Благодаря этому ваше приложение может одинаково работать где угодно.

Когда использовать

  • ✓Когда вы хотите запустить приложение ASP.NET на другом сервере.
  • ✓Когда вы готовите приложение к развертыванию в облаке.
  • ✓Чтобы приложение работало одинаково в разных средах тестирования.

Ссылка на скилл

https://github.com/github/awesome-copilot/blob/main/skills/containerize-aspnet-framework/SKILL.md

Скопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.

Как использовать

Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.

Готовое сообщение для вставки

Используй этот скилл, чтобы помочь мне: https://github.com/github/awesome-copilot/blob/main/skills/containerize-aspnet-framework/SKILL.md Прочитай файл SKILL.md по этой ссылке и следуй его инструкциям в моей задаче.
Хотите, чтобы ваш ИИ сам находил такие скиллы?Установите бесплатный MCP Skillpedia: одна строка, и перед каждой задачей он ищет среди 15 000+ скиллов.Установить за 1 минуту →

Пример запроса к вашему ИИ

“Сделай контейнер из моего проекта ASP.NET, который лежит по пути 'C:\myproject\myproject.csproj', используй Windows Server 2022 Core и открой порт 80.”

5 новых скиллов в неделю. 1 минута чтения.

Как это работает

Инструмент анализирует настройки, которые вы указываете, например путь к проекту и порты. Затем он создает файл Dockerfile со всеми командами для сборки и запуска вашего приложения в изолированной среде (контейнере).

Технический текст (оригинальный SKILL.md)

Оригинальный текст автора на английском, прямо с GitHub.

ASP.NET .NET Framework Containerization Prompt

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

REMEMBER: This is a .NET Framework application, not .NET Core. The containerization process will be different from that of a .NET Core application.

Containerization Settings

This section of the prompt contains the specific settings and configurations required for containerizing the ASP.NET (.NET Framework) 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. Windows Server SKU to use:

    • [Windows Server Core (Default) or Windows Server Full]
  3. Windows Server version to use:

    • [2022, 2019, or 2016 (Default 2022)]
  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., 80]
    • Additional ports: [List any additional ports, or "None"]
  2. User account the container should run as:

    • [User account, or default to "ContainerUser"]
  3. IIS settings that must be configured in the container image:

    • [List any specific IIS settings, or "None"]

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"]

Dependencies

  1. .NET assemblies that should be registered in the GAC in the container image:

    • [Assembly name and version, or "None"]
  2. MSIs that must be copied to the container image and installed:

    • [MSI names and versions, or "None"]
  3. COM components that must be registered in the container image:

    • [COM component names, or "None"]

System Configuration

  1. Registry keys and values that must be added to the container image:

    • [Registry paths and values, or "None"]
  2. Environment variables that must be set in the container image:

    • [Variable names and values, or "Use defaults"]
  3. Windows Server roles and features that must be installed in the container image:

    • [Role/feature names, or "None"]

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"]

.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 issues, or "None"]

Scope

  • ✅ App configuration modification to ensure config builders are used to read app settings and connection strings from the environment variables
  • ✅ Dockerfile creation and configuration for an ASP.NET application
  • ✅ Specifying multiple stages in the Dockerfile to build/publish the application and copy the output to the final image
  • ✅ Configuration of Windows container platform compatibility (Windows Server Core or Full)

…

Частые вопросы

Что такое контейнер?

Контейнер похож на легкую изолированную коробку, в которой лежит все, что нужно приложению для работы: код, библиотеки и настройки. Благодаря этому оно работает одинаково на любом компьютере.

В чем разница между .NET Framework и .NET Core?

.NET Framework это более старая версия, которая обычно используется в системах Windows. .NET Core (теперь просто .NET) более современный, кроссплатформенный и гибкий. Этот инструмент работает только с .NET Framework.

Нужно ли что-то установить заранее?

Да, в проекте должен быть установлен пакет NuGet 'Microsoft.Configuration.ConfigurationBuilders.Environment'. Если его нет, установите его вручную в Visual Studio перед использованием этого инструмента.

Подробности

Оригинальное описание автора

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

repo: github/awesome-copilot

Популярность

Звёзды на GitHub
40k
Место в рейтинге
#7116
Лицензия
MIT
Обновлён
15.10.2026

Полезен ли этот скилл?

0

Войдите , чтобы голосовать.

Комментарии

  • …

Другие скиллы из этого репозитория

Похожие скиллы