Start Debugging

Tag: containers

6 posts

Framework-dependent vs self-contained vs Native AOT for a .NET 11 container image
Framework-dependent on a chiseled aspnet image is the right default for an ASP.NET Core service on .NET 11, because the runtime layer is shared across services and a runtime CVE is fixed by a base image bump. Self-contained trimmed and Native AOT buy a 2x to 5x smaller image and a much faster cold start, and cost you that. Real published sizes, the layer-sharing math, and the .NET 11 base image inference bug that breaks the AOT path.
How to publish a .NET 11 app as a container image with dotnet publish /t:PublishContainer
A complete guide to building container images from a .NET 11 app with no Dockerfile: the PublishContainer target, ContainerRepository and ContainerImageTags, base image selection through ContainerBaseImage and ContainerFamily, pushing to a registry and how authentication resolves, multi-arch OCI image indexes, the non-root default user, entrypoint control, tarball output for scanners, and the cases where you still need a Dockerfile.