17
CHAPTER 2 | Choosing Between .NET and .NET Framework for Docker Containers
Docker registry to your Docker hosts. The contents are ready to run, enabling the fastest time from
starting the container to processing results.
In the Docker model, there is no need for compilation
from C# code, as there is when you run dotnet build or dotnet publish when using the build container.
In this optimized image, you put only the binaries and other content needed to run the application.
For example, the content created by
dotnet publish
contains only the compiled .NET binaries,
images, .js, and .css files.
Over time, you will see images that contain pre-jitted (the compilation from
IL to native that occurs at run time) packages.
Although there are multiple versions of the .NET and ASP.NET Core images, they all share one or more
layers, including the base layer. Therefore, the amount of disk space needed to store an image is
small; it consists only of the delta between your custom image and its base image.
The result is that it
is quick to pull the image from your registry.
When you explore the .NET image repositories at Microsoft Artifact Registry, you will find multiple
image versions classified or marked with tags. These tags help to decide which one to use,
depending
on the version you need, like those in the following table:
Dostları ilə paylaş: