📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

📚 Interview question

What is the difference between the .NET sdk, aspnet, runtime, runtime-deps and chiseled container images, and which do you use for what?

Junior Theory Beginner

🎯 Key points

  • sdk only in the build stage and CI, never shipped
  • aspnet for web APIs, runtime for workers and console apps
  • runtime-deps for self-contained and Native AOT (native code, no JIT, trimming limits)
  • Chiseled: no shell or package manager, non-root, smaller and fewer CVEs
  • extra chiseled variants add ICU and tzdata for globalisation
  • Smaller images pull faster, so scale-out and cold starts improve
  • Debug chiseled images with ephemeral debug containers

⏱ 30-second answer

sdk (mcr.microsoft.com/dotnet/sdk:10.0) has the full SDK, compilers and NuGet; use it only in the build stage and CI. aspnet has the ASP.NET Core and .NET runtimes: the default for web APIs. runtime has just the .NET runtime, for workers and console apps. runtime-deps has only the native libraries .NET needs (libc, OpenSSL, ICU where included), for self-contained apps and Native AOT (ahead-of-time compiled to native code, so no runtime or JIT is needed: faster start and less memory, but trimming and reflection limits).

Chiseled Ubuntu variants (-noble-chiseled, plus -extra with ICU and tzdata) remove the shell and package manager and run as non-root: about 100 MB smaller than full images and far fewer OS CVEs. The trade-off is debugging: no shell, so you use ephemeral debug containers.

🔍 What the interviewer is checking

Checks they can choose a base image for size, security and app type

↩ Usually asked after

More in Containers

Last updated 23 Nov 2026.

🌐 Sangam's Webring

⏪ Previous 🏠 Main Next ⏩
💬 Chat with me