<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Bill</title>
    <description>The latest articles on DEV Community by Bill (@mfund0).</description>
    <link>https://dev.to/mfund0</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1965347%2F016daa23-66ac-4bad-8575-53c7e02cb3ee.png</url>
      <title>DEV Community: Bill</title>
      <link>https://dev.to/mfund0</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mfund0"/>
    <language>en</language>
    <item>
      <title>Introducing Uatu - An AI-Powered System Troubleshooting</title>
      <dc:creator>Bill</dc:creator>
      <pubDate>Wed, 03 Dec 2025 06:21:31 +0000</pubDate>
      <link>https://dev.to/mfund0/introducing-uatu-an-ai-powered-system-troubleshooting-5a84</link>
      <guid>https://dev.to/mfund0/introducing-uatu-an-ai-powered-system-troubleshooting-5a84</guid>
      <description>&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/fractalops/uatu" rel="noopener noreferrer"&gt;Uatu&lt;/a&gt;&lt;/strong&gt; is an AI agent that troubleshoots your servers using Claude. It connects symptoms across CPU, memory, network, and disk to find root causes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5klxj8ne9zhbudfkjlyc.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5klxj8ne9zhbudfkjlyc.gif" alt="Uatu demo" width="600" height="375"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Two Modes
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Interactive Chat
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;uatu
You: why is my server slow?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Uatu investigates: checks load average, finds high CPU processes, analyzes memory pressure, looks for I/O bottlenecks.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pipe Logs
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;journalctl &lt;span class="nt"&gt;-u&lt;/span&gt; myservice | uatu &lt;span class="s2"&gt;"why did this crash?"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Uatu analyzes the logs and correlates with system state.&lt;/p&gt;

&lt;h2&gt;
  
  
  Security First
&lt;/h2&gt;

&lt;p&gt;Commands require approval before execution:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;⚠ Bash Command Approval Required
Risk Level: Standard

  du -sh /var/log/* | sort -rh | head -10

  ○ Allow once
  → Always allow 'du'
  ○ Deny
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Approval prompts with risk categories&lt;/li&gt;
&lt;li&gt;Allowlist for auto-approving safe commands&lt;/li&gt;
&lt;li&gt;Audit log tracks all security decisions&lt;/li&gt;
&lt;li&gt;Read-only mode uses MCP tools only (no bash)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Dangerous patterns (credential access, destructive operations) get explicit warnings.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;p&gt;Built on the &lt;a href="https://github.com/anthropics/claude-agent-sdk-python" rel="noopener noreferrer"&gt;Claude Agent SDK&lt;/a&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;MCP tools&lt;/strong&gt; for system monitoring (processes, ports, system info)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bash execution&lt;/strong&gt; with granular approval controls&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Specialized subagents&lt;/strong&gt; for CPU/memory, network, and I/O diagnostics&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Background execution&lt;/strong&gt; for slow filesystem scans&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All tools are sandboxed. Network access is disabled by default.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pipx &lt;span class="nb"&gt;install &lt;/span&gt;uatu
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"ANTHROPIC_API_KEY=your_key"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; .env
uatu
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or pipe stdin:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;app.log | uatu &lt;span class="s2"&gt;"find errors"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Examples
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;High CPU:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You: what's using CPU?
Uatu: I observe process 'node' (PID 1234) consuming 94% CPU...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Disk Full:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You: why is disk full?
Uatu: The Watcher reveals /var/log/app.log has grown to 45GB...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Network Issues:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You: check port 8080
Uatu: I observe port 8080 is bound by nginx (PID 5678)...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Configuration
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;UATU_READ_ONLY=true          # MCP tools only, no bash
UATU_REQUIRE_APPROVAL=true   # Prompt before bash execution
UATU_ALLOW_NETWORK=false     # Disable WebFetch/WebSearch
UATU_ENABLE_SUBAGENTS=true   # Specialized diagnostic agents
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why?
&lt;/h2&gt;

&lt;p&gt;System troubleshooting requires correlating multiple signals. Uatu:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Connects high load + low CPU → I/O bottleneck&lt;/li&gt;
&lt;li&gt;Links many &lt;code&gt;CLOSE_WAIT&lt;/code&gt; sockets → connection leak&lt;/li&gt;
&lt;li&gt;Spots zombie processes → parent process crash&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of running 10 commands and piecing it together, ask one question.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/fractalops/uatu" rel="noopener noreferrer"&gt;https://github.com/fractalops/uatu&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;License:&lt;/strong&gt; MIT&lt;br&gt;
&lt;strong&gt;Requires:&lt;/strong&gt; Python 3.10+, Anthropic API key&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>ai</category>
      <category>sysadmin</category>
      <category>devops</category>
    </item>
    <item>
      <title>Choosing the right .NET image for your workloads</title>
      <dc:creator>Bill</dc:creator>
      <pubDate>Thu, 24 Jul 2025 17:45:43 +0000</pubDate>
      <link>https://dev.to/mfund0/choosing-the-right-net-image-for-your-workloads-2ino</link>
      <guid>https://dev.to/mfund0/choosing-the-right-net-image-for-your-workloads-2ino</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Originally posted on &lt;a href="https://medium.com/c-sharp-programming/all-the-net-core-opsy-things-37b2e21eabb4" rel="noopener noreferrer"&gt;https://medium.com/c-sharp-programming/all-the-net-core-opsy-things-37b2e21eabb4&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This guide began as a conversation between me and someone exploring how to containerize .NET apps. The same questions kept coming up; from new developers to infrastructure and DevOps engineers and I kept pointing people to the docs. I decided to turn it into a practical walk through and post it here for anyone who finds it useful.&lt;/p&gt;

&lt;p&gt;When you pull an image from &lt;code&gt;mcr.microsoft.com/dotnet/*&lt;/code&gt;, you're getting more than a runtime; you're pulling from a carefully layered set of container images, each designed to be lightweight, secure, and purpose-built.&lt;/p&gt;

&lt;p&gt;Understanding these layers makes it easier to troubleshoot, secure, optimize performance, and pick the right image for your use case.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Image Families
&lt;/h2&gt;

&lt;p&gt;.NET container images are organized into families. Each serves a different job: running, building, hosting web apps, or acting as a base for self-contained apps.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5vqz0y8hngl4l6f7ig3e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5vqz0y8hngl4l6f7ig3e.png" alt="Image Families" width="583" height="193"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each family builds on the one below it, adding only what's needed. That layering impacts size and what's included by default.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Container Image Size vs Image Family
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Sizes are uncompressed and taken directly from docker image ls.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fruje0amtf6nvv05r6ibs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fruje0amtf6nvv05r6ibs.png" alt="Image family vs Size" width="335" height="212"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Understanding runtime-deps
&lt;/h2&gt;

&lt;p&gt;The lowest layer: a minimal Linux image with just enough to run a native .NET binary no package managers.&lt;br&gt;
 Use when:&lt;br&gt;
Your app is self-contained i.e: includes its own runtime.&lt;br&gt;
You're using Native AOT (compiled to native code).&lt;/p&gt;

&lt;p&gt;Includes only:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;System libraries (e.g., libc, libssl)&lt;/li&gt;
&lt;li&gt;CA certificates for HTTPS
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dotnet publish &lt;span class="nt"&gt;-c&lt;/span&gt; Release &lt;span class="nt"&gt;-r&lt;/span&gt; linux-x64 &lt;span class="nt"&gt;--self-contained&lt;/span&gt; &lt;span class="nb"&gt;true&lt;/span&gt; &lt;span class="nt"&gt;-o&lt;/span&gt; ./out
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv7bfj747t299i7jofl7i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv7bfj747t299i7jofl7i.png" alt="Docker image for runtimedeps" width="800" height="198"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  The .NET runtime Layer
&lt;/h2&gt;

&lt;p&gt;This layer includes the .NET runtime, allowing framework-dependent apps to run:&lt;br&gt;
Suitable for non-web apps like background workers, CLI tools, and gRPC services.&lt;br&gt;
Does not include web-specific libraries or compilers.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  The aspnet Layer
&lt;/h2&gt;

&lt;p&gt;Tailored for hosting ASP.NET Core applications:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Comes pre-installed with Kestrel, MVC, and SignalR.&lt;/li&gt;
&lt;li&gt;Ideal for web APIs and web applications in production.

&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  The sdk Layer
&lt;/h2&gt;

&lt;p&gt;Use this only for building and testing your .NET apps and don't ship it to Production:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Contains compilers, build tools (MSBuild), NuGet package management, and git.&lt;/li&gt;
&lt;li&gt;Not intended for deployment, use multi-stage Dockerfiles to keep production lean.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;Example use in a multi-stage Dockerfile:&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5g9qvmgl9ns8c4a50gpr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5g9qvmgl9ns8c4a50gpr.png" alt="Using the SDK as the build stage to end up with Smaller, secure, production-ready container images" width="567" height="247"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Using the SDK as the build stage to end up with Smaller, secure, production-ready container images.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Tag anatomy
&lt;/h2&gt;

&lt;p&gt;A .NET container image tag packs five key decisions into a single line. It specifies the .NET version, base OS, distro variant, runtime type, and CPU architecture.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz9bddvllihx734uqd6rl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz9bddvllihx734uqd6rl.png" alt="Tag anatomy" width="800" height="191"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Understanding the anatomy helps you make deliberate trade-offs for size, security, and compatibility, rather than relying on defaults.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffkg77vb29km7d5z18h8b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffkg77vb29km7d5z18h8b.png" alt="What each part of the tag means" width="738" height="155"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  Image Variants
&lt;/h2&gt;

&lt;p&gt;Variants customize the base image to suit different needs, adding or removing features like shells, package managers, globalization support, or startup optimizations. They further affect the size, the attack surface, performance, or compatibility.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbjwvkpdelh7g9kypfl1w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbjwvkpdelh7g9kypfl1w.png" alt="Ubuntu Image Variants and what's in them" width="686" height="153"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Variant vs Size&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftxs4tifud8lt2qzz4vp6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftxs4tifud8lt2qzz4vp6.png" alt="Variant vs Size" width="524" height="264"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  The Composite variant (suffix -composite)
&lt;/h2&gt;

&lt;p&gt;Composite images merge all .NET shared‑framework assemblies into a single pre‑compiled binary blob that the CLR memory‑maps at start‑up. By skipping per‑assembly probing and much of the JIT warm‑up, they deliver noticeably faster cold‑starts, an advantage for serverless or short‑lived tasks.&lt;/p&gt;

&lt;p&gt;The trade‑offs are tighter version lock‑in and a bulkier base layer: you can't swap individual framework DLLs, so any upgrade requires a full image rebuild, and the composite blob may be larger than a trimmed set of separate DLLs. They shine in latency‑sensitive environments but aren't ideal for plug‑in or extensibility scenarios that rely on replacing framework libraries. To build against a composite runtime, publish with &lt;code&gt;PublishReadyToRun=true&lt;/code&gt; and tag your runtime image with &lt;code&gt;‑composite&lt;/code&gt;.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Distroless images
&lt;/h2&gt;

&lt;p&gt;Distroless images are stripped-down containers designed for minimal attack surface and minimal size. They're ideal when you want to run .NET apps and you do not have the need to debug or customize them interactively.&lt;br&gt;
These images remove everything unnecessary to execute an app: no shell, no package manager, no root access, no globalization. You'll be running as the &lt;code&gt;app&lt;/code&gt; user by default. To regain full globalization support, append &lt;code&gt;-extra&lt;/code&gt; to your tag.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7nk5yeo90rsuq6sywnj9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7nk5yeo90rsuq6sywnj9.png" alt="distroless image families and variant" width="154" height="143"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Native AOT images
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot" rel="noopener noreferrer"&gt;Native AOT (Ahead-of-Time)&lt;/a&gt; images eliminate the need for the CoreCLR entirely. Instead of relying on the traditional .NET runtime and JIT compilation, your app is pre-compiled into a single native binary at build time.&lt;br&gt;
These images are designed for self-contained apps that use Native AOT compilation, ideal for scenarios where startup speed, low memory usage, and small image size matter.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dotnet publish &lt;span class="nt"&gt;-c&lt;/span&gt; Release &lt;span class="nt"&gt;-r&lt;/span&gt; linux-x64 /p:PublishAot&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Use sdk:&lt;em&gt;‑aot for building, runtime-deps:&lt;/em&gt;‑aot for running.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Faster startup&lt;/strong&gt; : No JIT means cold starts are significantly quicker.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lower memory footprint&lt;/strong&gt; : Only the app code and linked native dependencies are loaded.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Smaller container size&lt;/strong&gt; : Final images are typically under 30 MB.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No .NET runtime needed&lt;/strong&gt; : Runs on any compatible OS without installing .NET.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Native AOT images are used with the &lt;code&gt;runtime-deps&lt;/code&gt; family. You build the binary using an &lt;code&gt;sdk:*‑aot&lt;/code&gt; image, then copy it into a matching &lt;code&gt;runtime-deps:*‑aot&lt;/code&gt; image for production.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Security Matters
&lt;/h2&gt;

&lt;p&gt;Every additional package in a container is another potential vulnerability and adds to the attack surface of your workloads. Larger images often include shells, compilers, or debugging tools that make development easier, but also expand the attack surface in production. The GIF below illustrates that difference by scanning two official images &lt;code&gt;mcr.microsoft.com/dotnet/aspnet:8.0&lt;/code&gt; and &lt;code&gt;mcr.microsoft.com/dotnet/aspnet:8.0‑alpine&lt;/code&gt; which has a much leaner Alpine base.&lt;br&gt;
Watch how the package count and vulnerability tally drop when we move from the "fat" Debian image to the slimmer Alpine base.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F70h90wvgdxr5ychpppzp.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F70h90wvgdxr5ychpppzp.gif" alt="Figure: A quick grype run against apsnet:8.0 and aspnet:8.0-alpine" width="800" height="569"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;There's no single "best" .NET container image, only the best fit for your scenario. Each variant, whether full, chiseled, distroless, or AOT; trades convenience for control, size for compatibility, and debuggability for security. The defaults will work, but they are not always optimal. Understanding the official image layers lets you make deliberate, informed choices that match how your app runs and where it runs. Choose with intent, not habit.&lt;/p&gt;




&lt;h2&gt;
  
  
  Glossary
&lt;/h2&gt;

&lt;p&gt;Here are terms you might have encountered in this article and I did not give a description for.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Term&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;glibc&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;The GNU C library. Standard on many distros.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Distroless&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Image with no shell or package manager. Minimal attack surface.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;libssl&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;OpenSSL library used for HTTPS communication.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;CA certificates&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Root certs used to validate HTTPS/TLS connections.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;AOT&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Ahead‑of‑Time compilation. Produces faster, native binaries.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;JIT&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Just‑In‑Time compilation. Traditional .NET runtime optimization.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Self‑contained app&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Includes its own .NET runtime (&lt;code&gt;SelfContained=true&lt;/code&gt;).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Kestrel&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Lightweight web server built into ASP.NET Core.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;MVC&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Model‑View‑Controller pattern used in ASP.NET Core.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;SignalR&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Real‑time communication framework for ASP.NET Core.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;ICU&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;International Components for Unicode (globalization lib).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;shared‑framework assemblies&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;The set of core DLLs (e.g., &lt;code&gt;System.*&lt;/code&gt;, &lt;code&gt;Microsoft.AspNetCore.*&lt;/code&gt;) that ship with .NET.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;CLR memory‑maps, per‑assembly probing and JIT warm‑up&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;The normal start‑up work where the CLR locates each DLL on disk and performs initial Just‑In‑Time compilation.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;framework DLLs&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;The individual .NET libraries that make up the shared framework.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;CLR&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Common Language Runtime, the execution engine for .NET.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;DLL&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Dynamic‑Link Library — a compiled binary containing reusable code and resources.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;p&gt;Thanks for taking the time to read my article.&lt;/p&gt;

&lt;p&gt;Enjoyed the article?&lt;br&gt;
&lt;a href="https://coff.ee/mfundo" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8gpaqgk3eobzkyzf67qy.png" alt="Buy me a coffee" width="480" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>csharp</category>
      <category>backend</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
