dotnet / sdk-container-builds

Libraries and build tooling to create container images from .NET projects using MSBuild
https://learn.microsoft.com/en-us/dotnet/core/docker/publish-as-container
MIT License
175 stars 30 forks source link

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

Closed baronfel closed 6 months ago

baronfel commented 7 months ago

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.

baronfel commented 6 months ago

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