4.1 KiB
Guiding Principles
These are the guiding principles for the content, tagging and production of the official .NET Docker images. They establish a framework for the behavior customers can expect and the decision-making process when making changes to the images. They are not hard rules which are stringently enforced as there will be occasions where it is sensible to make special exceptions.
Image Content
-
Images are intended to satisfy the common usage scenarios. They are not intended to satisfy every possible usage scenario. As a result of this, decisions will be made (e.g. components excluded, configurations made, etc.) in order to keep the image size manageable.
It is expected there will be scenarios in which customers will need to create derived images that add the required components/settings. A few examples include:
- Alpine images have the .NET Invariant Mode enabled by default (details). Use cases that cannot tolerate the globalization invariant mode can reset the
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT
environment variable. - The System.Drawing.Common native dependencies are not included by default. If System.Drawing.Common is being used, the native dependencies will need to be added.
Component authors can package their bits in ways which make them more easily consumable from Docker without including them within the .NET images. Examples include:
- Support xcopy installs
- Package as a .NET global tool
- Ship within their own Docker image
- Support standalone execution and multi-stage builds
- Support running within a side car image
- Alpine images have the .NET Invariant Mode enabled by default (details). Use cases that cannot tolerate the globalization invariant mode can reset the
-
Components installed within the images are required to have the same or longer support lifecycle as .NET. For example, if a component is included with an LTSC release of .NET, then that
major.minor
component version will need to be supported for the life of the LTSC release. Components are expected to be serviced over their lifetime as appropriate. -
Breaking changes are not allowed within a release. This includes changes such as adding/removing components, adding/removing ENVs, and major/minor version changes to included components.
-
There should be parity within the supported image matrix. Examples include:
- If support for a new distro is added for a particular .NET version, then new
runtime-deps
,runtime
,aspnet
, andsdk
images should all be added for the new distro. - If a new component is added, it should be available across all supported OS types and architectures.
- If support for a new distro is added for a particular .NET version, then new
-
The matrix of supported container operating systems and versions will evolve on a continuous basis.
Image Tagging
See the supported tags for the tagging practices and policies used by the .NET team.
Engineering
-
Images will be included as part of the .NET release process. The Docker images will be released at the same time as the core product.
-
Images will be rebuilt only as necessary in order to limit downstream image rebuilds and deployments for consumers of .NET images. The Image Update Policy section of the README contains the exact guidelines for when images will be updated.
-
Images will never be deleted from the official Docker repositories. This does not apply to the nightly repositories.
-
The Dockerfiles used to produce all of the images will be publicly available. Customers will be able to take the Dockerfiles and build them to produce their own equivalent images. No special build steps or permissions should be needed to build the Dockerfiles.
-
No experimental Docker features will be utilized within the infrastructure used to produce the images. Utilizing experimental features can negatively affect the reliability of image production and introduces a risk to the integrity of the resulting artifacts.