dotnet / sdk-container-builds

Libraries and build tooling to create container images from .NET projects using MSBuild

Home Page:https://learn.microsoft.com/en-us/dotnet/core/docker/publish-as-container

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Container Images built for AOT should use the AOT-optimized images by default

baronfel opened this issue · comments

For projects that are publishing with PublishAOT set to true, we should default to using the jammy-chiseled-aot and alpine-aot images from mcr.microsoft.com/dotnet/nightly/runtime-deps. If the project is known to use localization (via InvariantGlobalization set to false, which is the default), then we should use the -extra variants of those same tags instead of -aot.

This delivers the most minimal images for those deployment modes. If a user prefers to not use these special variants, then they can skip this part of the inference process by setting ContainerFamiliy, or skip inference entirely by setting ContainerBaseImage explicitly.

Closing this because we have merged the linked PR for .NET SDK 8.0.200