cck-docker

Containerize .NET 10 applications into multi-stage Docker images with non-root runtime and health checks.

2|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/s205109/AHKFlowApp --skill cck-docker
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cck-docker
Source: https://github.com/s205109/AHKFlowApp/tree/main/.claude/skills/cck-docker
Command: npx skills add https://github.com/s205109/AHKFlowApp --skill cck-docker

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Containerizing .NET 10 applications can produce large, insecure, and slow-to-build images when best practices are not followed; this Skill provides clear patterns to produce lean, secure, and cache-friendly containers and Compose setups for local development and CI.

Core Features & Use Cases

  • Multi-stage builds to separate build and runtime stages and minimize final image size.
  • Layer caching pattern: copy project files and restore before copying full source to speed incremental builds.
  • Non-root runtime and security guidance to avoid running containers as root in production.
  • Health checks and lightweight /health endpoints to enable orchestrator and Docker health monitoring.
  • Docker Compose patterns for local development including environment-driven connection strings and service dependency health checks.
  • Use case: Containerize an ASP.NET Core Web API using a solution-based restore approach, publish to /app/publish, run with the aspnet runtime as a non-root user, expose a health endpoint, and orchestrate with Compose for local dev.

Quick Start

Create a multi-stage Dockerfile for your .NET 10 Web API that restores via project-file-first, publishes to /app/publish, uses the aspnet runtime with USER app, and exposes a /health endpoint.

Frequently Asked Questions about cck-docker

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a small and secure Docker image for a .NET 10 application?

Secure Docker images for .NET 10 use multi-stage builds to separate the SDK build environment from the runtime, copy project files first for layer caching, and configure a non-root user for the final image.

What is the best way to speed up Docker builds for .NET 10 Web APIs?

Speed up .NET 10 Docker builds by copying project files and running restore before copying the full source code, which allows Docker to cache the restored packages layer for faster incremental builds.

How do I configure Docker Compose for local .NET 10 development with service dependencies?

Docker Compose for local .NET 10 development uses environment-driven connection strings and configures service dependency health checks to ensure databases are ready before the application starts.

How do I add a health check to a .NET 10 Docker container?

Add a lightweight /health endpoint to your .NET 10 application and configure a Docker health check in your Dockerfile or Compose file to monitor container runtime health.

Why should I run my ASP.NET Core Docker container as a non-root user?

Running an ASP.NET Core container as a non-root user prevents privilege escalation attacks in production by ensuring the application process does not have administrative permissions inside the container.

Can I use the same Dockerfile pattern for .NET 10 worker services and Web APIs?

Yes, the multi-stage build pattern with project-file-first restore, non-root user configuration, and /app/publish output applies to both ASP.NET Core Web APIs and worker services.