← 返回列表
全部 Skill›DevOps›containerize-aspnet-framework

containerize-aspnet-framework

作者 @github · 语言 en
Containerize an ASP.NET .NET Framework project by creating Dockerfile and .dockerfile files customized for the project.
DevOps容器通用执行命令访问网络读写文件待翻译
最近源活动
—
检测 SKILL.md 语言
en
星标 ★
41,524
分支 Fork
0
安装选项
提示
指令
使用 AI 助手安装
将下面的提示复制到你正在使用的 AI 助手中。
下载完整 Skill 目录(含全部配套文件)。 下载压缩包 ↓
SKILL.md 原文预览

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)]
  1. Windows Server SKU to use:
  • [Windows Server Core (Default) or Windows Server Full]
  1. Windows Server version to use:
  • [2022, 2019, or 2016 (Default 2022)]
  1. 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)]
  1. 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"]
  1. User account the container should run as:
  • [User account, or default to "ContainerUser"]
  1. 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"]
  1. 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"]
  1. MSIs that must be copied to the container image and installed:
  • [MSI names and versions, or "None"]
  1. 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"]
  1. Environment variables that must be set in the container image:
  • [Variable names and values, or "Use defaults"]
  1. 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"]
  1. 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"]
  1. 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"]
  1. 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)
  • ✅ Proper handling of dependencies (GAC assemblies, MSIs, COM components)
  • ❌ No infrastructure setup (assumed to be handled separately)
  • ❌ No code changes beyond those required for containerization

Execution Process

  1. Review the containerization settings above to understand the containerization requirements
  2. Create a progress.md file to track changes with check marks
  3. Determine the .NET Framework version from the project's .csproj file by checking the TargetFrameworkVersion element
  4. Select the appropriate Windows Server container image based on:
  • The .NET Framework version detected from the project
  • The Windows Server SKU specified in containerization settings (Core or Full)
  • The Windows Server version specified in containerization settings (2016, 2019, or 2022)
  • Windows Server Core tags can be found at: https://github.com/microsoft/dotnet-framework-docker/blob/main/README.aspnet.md#full-tag-listing
  1. Ensure that required NuGet packages are installed. DO NOT install these if they are missing. If they are not installed, the user must install them manually. If they are not installed, pause executing this prompt and ask the user to install them using the Visual Studio NuGet Package Manager or Visual Studio package manager console. The following packages are require
评论
Ggithub
github
github/awesome-copilot
查看 GitHub 仓库 查看作者的其他 Skill
来源信息
作者@github
所属大类DevOps / 容器
国内可用性通用
最近源活动—
风险提示执行命令、访问网络、读写文件
提示:风险标签为程序静态扫描结果,仅作提示,不代表安全认证。安装前请阅读 SKILL.md 及其引用的脚本、权限,自行判断是否可信。