You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An Alpine-based Docker image is now available for .NET Core. Alpine is much smaller than Debian, which we have used for the .NET Core base image to date. There have been many requests for an Alpine image. We are pleased to make it available. Please check out .NET Core Docker Sample to see examples of using this image.
We have added two new images:
2.1-runtime-alpine
2.1-runtime-deps-alpine
Alpine support is part of the .NET Core 2.1 release. .NET Core 2.1 images are currently provided at the microsoft/dotnet repo, including the new Alpine images.
Discussion
Please share your thoughts on this change and see what others are saying at:
The primary goal of Alpine is very small deployments. We have been considering various design decisions to make .NET Core Alpine base images as small as possible to align with that. In this first iteration, we enabled .NET Core 2.0 Globalization Invariant Mode in order to reduce the default size of the image. This change reduced the image by ~30MB. You can see the reduction in size for .NET Core images relative to Debian in the following table.
2.1 Image
Debian
Alpine
-deps
153MB (68MB compressed)
13.8 MB (6MB compressed)
-runtime
222MB (96MB compressed)
82.5 (34MB compressed)
Note: The compressed size is what you will see in a registry and is the wire-size cost.
We are also considering saving more space by native-compiling fewer assemblies. .NET Core runtime assemblies are native-compiled with the crossgen tool in the Ready2Run format. Native-compiled code delivers superior startup performance but at the cost of 2-3x larger files. We have the opportunity to compile less, skipping compiling assemblies in part or in whole. We believe that we can save at least another 10MB through compiling less without a material drop in performance. For scenarios that value size over startup or where wire cost is significant, it may be valuable to aggressively reduce the number/% of compilation.
Alpine images are only available for .NET Core 2.1. At the current time, only Runtime images are available. We intend to offer SDK images at a later date.
Use cases that cannot tolerate Globalization invariant mode can reset the DOTNET_SYSTEM_GLOBALIZATION_INVARIANT environment variable and install the ICU package. Please check out .NET Core Docker Sample to see examples of using this image with and without Globalization Invariant Mode enabled.
Call to Action
Please test your workloads with the new Alpine image. In particular, we want to know if enabling .NET Core Globalization Invariant Mode is acceptable/appreciated.
The text was updated successfully, but these errors were encountered:
.NET Core Docker Alpine Image Ready for Testing
Update: Alpine is now supported with .NET Core 2.1.
An Alpine-based Docker image is now available for .NET Core. Alpine is much smaller than Debian, which we have used for the .NET Core base image to date. There have been many requests for an Alpine image. We are pleased to make it available. Please check out .NET Core Docker Sample to see examples of using this image.
We have added two new images:
2.1-runtime-alpine
2.1-runtime-deps-alpine
Alpine support is part of the .NET Core 2.1 release. .NET Core 2.1 images are currently provided at the microsoft/dotnet repo, including the new Alpine images.
Discussion
Please share your thoughts on this change and see what others are saying at:
Details
The primary goal of Alpine is very small deployments. We have been considering various design decisions to make .NET Core Alpine base images as small as possible to align with that. In this first iteration, we enabled .NET Core 2.0 Globalization Invariant Mode in order to reduce the default size of the image. This change reduced the image by ~30MB. You can see the reduction in size for .NET Core images relative to Debian in the following table.
-deps
-runtime
Note: The compressed size is what you will see in a registry and is the wire-size cost.
We are also considering saving more space by native-compiling fewer assemblies. .NET Core runtime assemblies are native-compiled with the crossgen tool in the Ready2Run format. Native-compiled code delivers superior startup performance but at the cost of 2-3x larger files. We have the opportunity to compile less, skipping compiling assemblies in part or in whole. We believe that we can save at least another 10MB through compiling less without a material drop in performance. For scenarios that value size over startup or where wire cost is significant, it may be valuable to aggressively reduce the number/% of compilation.
Alpine images are only available for .NET Core 2.1. At the current time, only Runtime images are available. We intend to offer SDK images at a later date.
Use cases that cannot tolerate Globalization invariant mode can reset the
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT
environment variable and install the ICU package. Please check out .NET Core Docker Sample to see examples of using this image with and without Globalization Invariant Mode enabled.Call to Action
Please test your workloads with the new Alpine image. In particular, we want to know if enabling .NET Core Globalization Invariant Mode is acceptable/appreciated.
The text was updated successfully, but these errors were encountered: