Token导航 LogoToken导航

Agent Skill · 开发

containerize-aspnetcore(容器化 aspnetcore)

containerize-aspnetcore 用于记录任务执行中的错误、用户纠正、经验和能力缺口,适合在 Codex、Claude、Cursor、Gemini CLI 中希望让 Agent 持续沉淀问题、修正和最佳实践时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

containerize-aspnetcore 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描有未通过项,按安装量在开发类的 21,746 个 Skill 里排第 188。

总安装 205,632周安装 8,419GitHub Stars 31,705下载 65,856核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:containerize-aspnetcore(容器化 aspnetcore)
来源仓库:https://github.com/github/awesome-copilot
仓库路径:skills/containerize-aspnetcore
安装命令:
npx skills add https://github.com/github/awesome-copilot --skill containerize-aspnetcore
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/github/awesome-copilot --skill containerize-aspnetcore

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

生成为 ASP.NET Core 容器化定制的 Dockerfile 和 .dockerignore 文件。

接受 .NET 版本、Linux 发行版(Debian、Alpine、Ubuntu、Chiseled、Azure Linux)、基础映像、端口和环境变量的可配置设置 遵循 Microsoft .NET 容器化最佳实践,创建具有 SDK 构建阶段和优化运行时阶段的多阶段 Dockerfile 生成具有合理默认值(bin/、obj/、.git/等)以及自定义模式的 .dockerignore 文件,并通过 HEALTHCHECK 指令支持运行状况检查配置 处理依赖项,包括系统包、本机库、其他 .NET 工具、NuGet 源以及容器化前后的自定义构建步骤

来源仓库内路径:skills/containerize-aspnetcore

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/github/awesome-copilot --skill containerize-as…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

containerize-aspnetcore 怎么安装?

在终端执行 npx skills add https://github.com/github/awesome-copilot --skill containerize-aspnetcore。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

containerize-aspnetcore 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

containerize-aspnetcore 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

containerize-aspnetcore 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

containerize-aspnetcore 用的人多吗?

公开数据是累计安装 205,632 次,近一周安装 8,419 次,下载 65,856 次,GitHub 31,705 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

containerize-aspnetcore 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 来源仓库有 31,705 星,维护活跃度相对可查。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
containerize-aspnetcore

容器化 aspnetcore · 本页

205,63231,705接触敏感数据未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

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

  1. .NET version to use:

- [8.0 or 9.0 (Default 8.0)]

  1. Linux distribution to use:

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

  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., 8080] - Additional ports: [List any additional ports, or "None"]

  1. User account the container should run as:

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

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

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

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

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

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

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

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

  1. Files/directories to exclude from containerization:

- [Paths to exclude, or "None"]

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

  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 application settings and connection strings can be read from environment variables
  • ✅ Dockerfile creation and configuration for an ASP.NET Core application
  • ✅ Specifying multiple stages in the Dockerfile to build/publish the application and copy the output to the final image
  • ✅ Configuration of Linux container platform compatibility (Alpine, Ubuntu, Chiseled, or Azure Linux (Mariner))
  • ✅ Proper handling of dependencies (system packages, native libraries, additional tools)
  • ❌ 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 version from the project's.csproj file by checking the TargetFramework element
  4. Select the appropriate Linux container image based on:

- The.NET version detected from the project - The Linux distribution specified in containerization settings (Alpine, Ubuntu, Chiseled, or Azure Linux (Mariner)) - If the user does not request specific base images in the containerization settings, then the base images MUST be valid mcr.microsoft.com/dotnet images with a tag as shown in the example Dockerfile, below, or in documentation - Official Microsoft.NET images for build and runtime stages: - SDK image tags (for build stage): https://github.com/dotnet/dotnet-docker/blob/main/README.sdk.md - ASP.NET Core runtime image tags: https://github.com/dotnet/dotnet-docker/blob/main/README.aspnet.md - .NET runtime image tags: https://github.com/dotnet/dotnet-docker/blob/main/README.runtime.md

  1. Create a Dockerfile in the root of the project directory to containerize the application

- The Dockerfile should use multiple stages: - Build stage: Use a.NET SDK image to build the application - Copy csproj file(s) first - Copy NuGet.config if one exists and configure any private feeds - Restore NuGet packages - Then, copy the rest of the source code and build and publish the application to /app/publish - Final stage: Use the selected.NET runtime image to run the application - Set the working directory to /app - Set the user as directed (by default, to a non-root user (e.g., $APP_UID)) - Unless directed otherwise in containerization settings, a new user does *not* need to be created. Use the $APP_UID variable to specify the user account. - Copy the published output from the build stage to the final image - Be sure to consider all requirements in the containerization settings: - .NET version and Linux distribution - Exposed ports - User account for container - ASPNETCORE_URLS configuration - System package installation - Native library dependencies - Additional.NET tools - Environment variables - File/directory copying - Volume mount points - Health check configuration

  1. Create a .dockerignore file in the root of the project directory to exclude unnecessary files from the Docker image. The .dockerignore file MUST include at least the following elements as well as additional patterns as specified in the containerization settings:

- bin/ - obj/ - .dockerignore - Dockerfile - .git/ - .github/ - .vs/ - .vscode/ - **/node_modules/ - *.user - *.suo - /.DS_Store - /Thumbs.db - Any additional patterns specified in the containerization settings

  1. Configure health checks if specified in the containerization settings:

- Add HEALTHCHECK instruction to Dockerfile if health check endpoint is provided - Use curl or wget to check the health endpoint

  1. Mark tasks as completed: [] → [✓]
  2. Continue until all tasks are complete and Docker build succeeds

Build and Runtime Verification

Confirm that Docker build succeeds once the Dockerfile is completed. Use the following command to build the Docker image:

docker build -t aspnetcore-app:latest .

If the build fails, review the error messages and make necessary adjustments to the Dockerfile or project configuration. Report success/failure.

Progress Tracking

Maintain a progress.md file with the following structure:

# Containerization Progress

## Environment Detection
- [ ] .NET version detection (version: ___)
- [ ] Linux distribution selection (distribution: ___)

## Configuration Changes
- [ ] Application configuration verification for environment variable support
- [ ] NuGet package source configuration (if applicable)

## Containerization
- [ ] Dockerfile creation
- [ ] .dockerignore file creation
- [ ] Build stage created with SDK image
- [ ] csproj file(s) copied for package restore
- [ ] NuGet.config copied if applicable
- [ ] Runtime stage created with runtime image
- [ ] Non-root user configuration
- [ ] Dependency handling (system packages, native libraries, tools, etc.)
- [ ] Health check configuration (if applicable)
- [ ] Special requirements implementation

## Verification
- [ ] Review containerization settings and make sure that all requirements are met
- [ ] Docker build success

Do not pause for confirmation between steps. Continue methodically until the application has been containerized and Docker build succeeds.

YOU ARE NOT DONE UNTIL ALL CHECKBOXES ARE MARKED! This includes building the Docker image successfully and addressing any issues that arise during the build process.

Example Dockerfile

An example Dockerfile for an ASP.NET Core (.NET) application using a Linux base image.

# ============================================================
# Stage 1: Build and publish the application
# ============================================================

# Base Image - Select the appropriate .NET SDK version and Linux distribution
# Possible tags include:
# - 8.0-bookworm-slim (Debian 12)
# - 8.0-noble (Ubuntu 24.04)
# - 8.0-alpine (Alpine Linux)
# - 9.0-bookworm-slim (Debian 12)
# - 9.0-noble (Ubuntu 24.04)
# - 9.0-alpine (Alpine Linux)
# Uses the .NET SDK image for building the application
FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim AS build
ARG BUILD_CONFIGURATION=Release

WORKDIR /src

# Copy project files first for better caching
COPY ["YourProject/YourProject.csproj", "YourProject/"]
COPY ["YourOtherProject/YourOtherProject.csproj", "YourOtherProject/"]

# Copy NuGet configuration if it exists
COPY ["NuGet.config", "."]

# Restore NuGet packages
RUN dotnet restore "YourProject/YourProject.csproj"

# Copy source code
COPY . .

# Perform custom pre-build steps here, if needed
# RUN echo "Running pre-build steps..."

# Build and publish the application
WORKDIR "/src/YourProject"
RUN dotnet build "YourProject.csproj" -c $BUILD_CONFIGURATION -o /app/build

# Publish the application
RUN dotnet publish "YourProject.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false

# Perform custom post-build steps here, if needed
# RUN echo "Running post-build steps..."

# ============================================================
# Stage 2: Final runtime image
# ============================================================

# Base Image - Select the appropriate .NET runtime version and Linux distribution
# Possible tags include:
# - 8.0-bookworm-slim (Debian 12)
# - 8.0-noble (Ubuntu 24.04)
# - 8.0-alpine (Alpine Linux)
# - 8.0-noble-chiseled (Ubuntu 24.04 Chiseled)
# - 8.0-azurelinux3.0 (Azure Linux)
# - 9.0-bookworm-slim (Debian 12)
# - 9.0-noble (Ubuntu 24.04)
# - 9.0-alpine (Alpine Linux)
# - 9.0-noble-chiseled (Ubuntu 24.04 Chiseled)
# - 9.0-azurelinux3.0 (Azure Linux)
# Uses the .NET runtime image for running the application
FROM mcr.microsoft.com/dotnet/aspnet:8.0-bookworm-slim AS final

# Install system packages if needed (uncomment and modify as needed)
# RUN apt-get update && apt-get install -y \
#     curl \
#     wget \
#     ca-certificates \
#     libgdiplus \
#     && rm -rf /var/lib/apt/lists/*

# Install additional .NET tools if needed (uncomment and modify as needed)
# RUN dotnet tool install --global dotnet-ef --version 8.0.0
# ENV PATH="$PATH:/root/.dotnet/tools"

WORKDIR /app

# Copy published application from build stage
COPY --from=build /app/publish .

# Copy additional files if needed (uncomment and modify as needed)
# COPY ./config/appsettings.Production.json .
# COPY ./certificates/ ./certificates/

# Set environment variables
ENV ASPNETCORE_ENVIRONMENT=Production
ENV ASPNETCORE_URLS=http://+:8080

# Add custom environment variables if needed (uncomment and modify as needed)
# ENV CONNECTIONSTRINGS__DEFAULTCONNECTION="your-connection-string"
# ENV FEATURE_FLAG_ENABLED=true

# Configure SSL/TLS certificates if needed (uncomment and modify as needed)
# ENV ASPNETCORE_Kestrel__Certificates__Default__Path=/app/certificates/app.pfx
# ENV ASPNETCORE_Kestrel__Certificates__Default__Password=your_password

# Expose the port the application listens on
EXPOSE 8080
# EXPOSE 8081  # Uncomment if using HTTPS

# Install curl for health checks if not already present
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*

# Configure health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
    CMD curl -f http://localhost:8080/health || exit 1

# Create volumes for persistent data if needed (uncomment and modify as needed)
# VOLUME ["/app/data", "/app/logs"]

# Switch to non-root user for security
USER $APP_UID

# Set the entry point for the application
ENTRYPOINT ["dotnet", "YourProject.dll"]

Adapting this Example

Note: Customize this template based on the specific requirements in containerization settings.

When adapting this example Dockerfile:

  1. Replace YourProject.csproj, YourProject.dll, etc. with your actual project names
  2. Adjust the.NET version and Linux distribution as needed
  3. Modify the dependency installation steps based on your requirements and remove any unnecessary ones
  4. Configure environment variables specific to your application
  5. Add or remove stages as needed for your specific workflow
  6. Update the health check endpoint to match your application's health check route

Linux Distribution Variations

Alpine Linux

For smaller image sizes, you can use Alpine Linux:

FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build
# ... build steps ...

FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine AS final
# Install packages using apk
RUN apk update && apk add --no-cache curl ca-certificates

Ubuntu Chiseled

For minimal attack surface, consider using chiseled images:

FROM mcr.microsoft.com/dotnet/aspnet:8.0-jammy-chiseled AS final
# Note: Chiseled images have minimal packages, so you may need to use a different base for additional dependencies

Azure Linux (Mariner)

For Azure-optimized containers:

FROM mcr.microsoft.com/dotnet/aspnet:8.0-azurelinux3.0 AS final
# Install packages using tdnf
RUN tdnf update -y && tdnf install -y curl ca-certificates && tdnf clean all

Notes on Stage Naming

  • The AS stage-name syntax gives each stage a name
  • Use --from=stage-name to copy files from a previous stage
  • You can have multiple intermediate stages that aren't used in the final image
  • The final stage is the one that becomes the final container image

Security Best Practices

  • Always run as a non-root user in production
  • Use specific image tags instead of latest
  • Minimize the number of installed packages
  • Keep base images updated
  • Use multi-stage builds to exclude build dependencies from the final image

平台分布

Codex

36.81%
按下载量换算24,242

Claude

30.57%
按下载量换算20,132

Cursor

18.8%
按下载量换算12,381

Gemini CLI

9.62%
按下载量换算6,335

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills