containerize-aspnetcore
Skill này làm gì
Công cụ này tạo các hướng dẫn cần thiết (gọi là Dockerfile) để biến dự án ASP.NET Core của bạn thành một “container”. Container là một gói biệt lập chứa mọi thứ ứng dụng cần để chạy, giúp triển khai dễ dàng ở các môi trường khác nhau.
Khi nào nên dùng
- ✓Khi bạn muốn chạy ứng dụng ASP.NET Core trên máy chủ mà không phải cài đặt mọi thứ thủ công.
- ✓Khi chuẩn bị ứng dụng để triển khai lên đám mây (như Azure, AWS, Google Cloud).
- ✓Khi bạn cần đảm bảo ứng dụng hoạt động giống nhau trên mọi máy tính.
Liên kết skill
https://github.com/github/awesome-copilot/blob/main/skills/containerize-aspnetcore/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tạo container cho dự án ASP.NET Core của tôi trong thư mục 'my-project/my-app.csproj', dùng .NET 8 và bản phân phối Alpine Linux.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ phân tích các thiết lập bạn cung cấp, như phiên bản .NET và loại Linux mong muốn. Dựa trên đó, nó tạo tệp Dockerfile, là hướng dẫn từng bước để build container cho ứng dụng của bạn.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Project to containerize:
[ProjectName (provide path to .csproj file)]
.NET version to use:
[8.0 or 9.0 (Default 8.0)]
Linux distribution to use:
[debian, alpine, ubuntu, chiseled, or Azure Linux (mariner) (Default debian)]
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)]
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
Ports that must be exposed in the container image:
- Primary HTTP port:
[e.g., 8080] - Additional ports:
[List any additional ports, or "None"]
- Primary HTTP port:
User account the container should run as:
[User account, or default to "$APP_UID"]
Application URL configuration:
[Specify ASPNETCORE_URLS, or default to "http://+:8080"]
Build configuration
Custom build steps that must be performed before building the container image:
[List any specific build steps, or "None"]
Custom build steps that must be performed after building the container image:
[List any specific build steps, or "None"]
NuGet package sources that must be configured:
[List any private NuGet feeds with authentication details, or "None"]
Dependencies
System packages that must be installed in the container image:
[Package names for the chosen Linux distribution, or "None"]
Native libraries that must be copied to the container image:
[Library names and paths, or "None"]
Additional .NET tools that must be installed:
[Tool names and versions, or "None"]
System Configuration
- Environment variables that must be set in the container image:
[Variable names and values, or "Use defaults"]
File System
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"]
Files/directories to exclude from containerization:
[Paths to exclude, or "None"]
Volume mount points that should be configured:
[Volume paths for persistent data, or "None"]
.dockerignore Configuration
- Patterns to include in the
.dockerignorefile (.dockerignore will already have common defaults; these are additional patterns):- Additional patterns:
[List any additional patterns, or "None"]
- Additional patterns:
Health Check Configuration
Health check endpoint:
[Health check URL path, or "None"]
Health check interval and timeout:
[Interval and timeout values, or "Use defaults"]
Additional Instructions
Other instructions that must be followed to containerize the project:
[Specific requirements, or "None"]
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))
…
Câu hỏi thường gặp
Container là gì?
Hãy hình dung container là một hộp tiêu chuẩn chứa ứng dụng và mọi thứ nó cần để hoạt động (mã, thư viện, thiết lập). Điều này đảm bảo nó chạy nhất quán ở mọi nơi.
Dockerfile là gì?
Đó là tệp văn bản chứa các chỉ dẫn mà Docker (công nghệ container) làm theo để build image container. Nó giống như công thức để tạo gói ứng dụng của bạn.
Tôi có cần biết nhiều về Docker để dùng công cụ này không?
Không. Công cụ này làm phần phức tạp thay bạn, bạn chỉ cần cung cấp các thiết lập cơ bản của dự án để tạo container.
Chi tiết
Mô tả gốc của tác giả
Containerize an ASP.NET Core project by creating Dockerfile and .dockerfile files customized for the project.
repo: github/awesome-copilot
Độ phổ biến
- Sao GitHub
- 40k
- Vị trí xếp hạng
- #7117
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
acquire-codebase-knowledge
40kGiúp agent của bạn hiểu và ghi tài liệu cho một dự án mã nguồn có sẵn. Hữu ích khi đón thành viên mới hoặc nắm tổng quan về kiến trúc.
acreadiness-assess
40kGiúp agent của bạn đánh giá mức độ sẵn sàng cho AI của dự án và tạo báo cáo. Hữu ích để biết dự án đã sẵn sàng dùng công cụ AI đến đâu.
acreadiness-generate-instructions
40kGiúp agent của bạn tạo hướng dẫn cho công cụ AI dựa trên kết quả đánh giá. Hữu ích để cải thiện cách AI làm việc với mã và khắc phục các khoảng trống.
acreadiness-policy
40kGiúp agent của bạn xác định hoặc áp dụng chính sách đánh giá dự án bằng AI. Hữu ích để chuẩn hóa cách đánh giá dự án và đảm bảo tuân thủ.
Skill tương tự
openclaw-update
394kGiúp agent của bạn cập nhật OpenClaw Gateway đang có, chọn cách cập nhật phù hợp với cách cài đặt và giữ phiên làm việc của bạn hoạt động.
diagnose-gateway
394kGiúp agent của bạn tìm hiểu vì sao OpenClaw Gateway bị lỗi bằng cách kiểm tra cài đặt, kênh và cổng mà không thay đổi gì.
crabbox-apps
394kGiúp agent của bạn mở và chạy một app trên máy đám mây tạm thời, rồi hiển thị giao diện của nó trong thanh bên của chat.