What a world! An ASP.NET Core Minimal API, running as a top-level statement on .NET 7.0, being AOT statically compiled into a container image (FROM scratch, no deps!), running without issue. (I'll save you the list of warnings, but details below...)
Finally at the bottom we have the running container and browser pointing to it. The app is a bit chunky for a "Hello, World!" API (coming in at 91.6MB), but that is everything, no extra layers or dependencies, just our app.
Now I personally wouldn't use this in production (who am I kidding, I totally would but I'd never recommend someone else should!), but it's a cool proof of concept for minimal containers and .NET
Want to hear more? Have questions? Want to know why? Let me know!