Docker Community Forums

Share and learn in the Docker community.

How to optimize Asp.net Application or Multi stage build for Asp.net Image

My original question for Docker desktop for windows is How to create multistage build for Microsoft asp dot net images.

Since i am referring mcr.microsoft.com/dotnet/framework/aspnet :4.8-windowsservercore-ltsc2019 image for Asp dot net MVC application. Which is highly huge compare with other images.

My main concern which image should i prefer for Docker desktop for windows to run my Asp.net application ? Along with i should have an option where i could build image and publish the binary in fews of MB’s.

Can anyone recommend me for this approach ?

Or should i go for Asp doo net Core one, where i could more leverage lightweight containers. I could use any of container which support for open source.