dotnet-docker icon indicating copy to clipboard operation
dotnet-docker copied to clipboard

Provide Officially-Supported .NET 8 AOT Images

Open simonkurtz-MSFT opened this issue 1 year ago • 1 comments

We just published container optimizations to the Azure Container Apps .NET Workshop. This workshop provides guidance to our customers using ACA & .NET. Since ACA is Linux only, building for a specific platform with AOT is very suitable and would provide great advantages in terms of storage, transfer, start-up (no JIT compiler) and, likely, memory footpring.

Presently, the AOT images are nightly images, which doesn't instill much confidence with customers looking for a stable version. Please consider providing periodic AOT images given all the benefits they provide.

Thank you!

simonkurtz-MSFT avatar Nov 21 '23 17:11 simonkurtz-MSFT

Hi @simonkurtz-MSFT, thanks for the feedback!

If you are looking for a short-term, size efficient solution for publishing Native AOT apps, I'd encourage you to look at the releasesapi Debian sample.

In that Dockerfile, you can replace the SDK tag with the Jammy SDK and the runtime deps tag with the Jammy Chiseled runtime deps image to get almost all of the size reduction benefits. We cover this in the .NET sample image size report. The only difference between the runtime-deps and the runtime-deps AOT image is the presence of the libstdc++ library, which ends up being about a 1 MB (compressed) image size savings.

lbussell avatar Nov 21 '23 18:11 lbussell