Repository navigation
Closed
Labels
Description
New Linux Distro Version
Distro: CBL-Mariner 1.0
ImageBuilder Tasks
- Ensure that the ImageBuilder supports the new distro version in the code to generate the correct README display name from the version specified in the manifest
Nightly Branch Tasks
-
- Copy the Dockerfiles of the most recent version of that distro (or author new ones for an entirely new distro) and place them in a version-specific folder under their respective variants (runtime-deps, runtime, aspnet, sdk). Note: not all variants have a corresponding runtime-deps image.
-
- Modify the Dockerfiles as appropriate for any specific changes related to the new distro version
-
- Update manifest.json to reference the new set of Dockerfiles with the appropriate tags
- Move any distro-specific floating tags to the newer version (e.g.
3.1-alpine)
- Move any distro-specific floating tags to the newer version (e.g.
- Update manifest.json to reference the new set of Dockerfiles with the appropriate tags
-
- Update the test data to include the new distro version
-
- Update the tags metadata templates to include the new distro version
-
- Run the command to update the READMEs:
.\eng\readme-templates\Get-GeneratedReadmes.ps1
- Run the command to update the READMEs:
-
- Run the command to update the image size baseline file:
.\tests\performance\Validate-ImageSize.ps1 -UpdateBaselines
- Run the command to update the image size baseline file:
-
- Inspect generated changes for correctness
-
- Consider whether sample Dockerfiles should be authored if this is a new distro and them to the samples
-
- Run the command to build and test your changes:
.build-and-test.ps1 -OS <os>
- Run the command to build and test your changes:
-
- Commit generated changes
-
- Create PR
-
- Get PR signoff
-
- Merge PR to nightly branch
-
- Wait for automatically queued CI build to finish on dotnet-docker-nightly pipeline (internal MSFT link)
-
- Confirm READMEs have been updated in Docker Hub
Main Branch Tasks
-
- After the product teams have signed off on the new distro, merge these changes to the main branch as part of the release process for the next .NET release
-
- Create an announcement (example: Alpine 3.10) unless the new distro is added only for pre-release versions in which the announcement would be incorporated in the pre-release notes.
Activity
mthalman commentedon Jun 7, 2021
The approach being used to define these Dockerfiles is to install .NET bits via RPM packages downloaded directly from blob storage. This provides the advantage of being able to target any version of .NET even if it isn't made available from packages.microsoft.com (e.g. preview releases) as well as correctly interacting with the package manager to enable third-party package dependencies (e.g. a third-party dependency on the dotnet-sdk package will show that the dotnet-sdk package is installed in the sdk image).
However, there is a question around how to best deal with the runtime-deps package. It seems logical to install the runtime-deps package in the runtime-deps image. However, the runtime-deps package is fully versioned with a three-part version number. This complicates matters because we strive to share the runtime-deps Dockerfile as much as possible across .NET versions. For example, there is nothing version-specific in the runtime-deps Dockerfile for 3.1 which gets built and tagged as 3.1, 5,0, and 6.0. This optimizes for layer sharing.
The options below describe different strategies for defining the runtime-deps Dockerfiles.
Factors to consider for each of these options:
Option 1: Runtime-deps image hierarchy
This option defines a hierarchy amongst the runtime-deps images. The base of the hierarchy would be 3.1, followed by 5.0, and then 6.0. Each Dockerfile would install their respective version of the runtime-deps package. This would look roughly like the following:
3.1 (pseudo) Dockerfile:
5.0 (pseudo) Dockerfile:
6.0 (pseudo) Dockerfile:
Pros:
Cons:
Option 2: Combine multiple runtime-deps packages into one Dockerfile
Option 2a: One runtime-deps Dockerfile for all versions
This defines a single "kitchen sink" Dockerfile to install all the runtime-deps packages:
(pseudo) Dockerfile:
Pros:
Cons:
Option 2b: Split runtime-deps Dockerfiles between servicing and preview
This option solves the issue from 2a wrt preview releases by defining a separate Dockerfile just for .NET versions that are in preview.
Servicing (pseudo) Dockerfile:
Preview (pseudo) Dockerfile:
Pros:
Cons:
Option 3: Don't install runtime-deps package in runtime-deps Dockerfile
This option defines the runtime-deps Dockerfile without installing the runtime-deps package and only the underlying dependent packages. The runtime-deps package would then get installed by the runtime Dockerfile instead. The installation of the runtime-deps package basically becomes a no-op because the dependent packages are already installed from the base runtime-deps image.
runtime-deps (pseudo) Dockerfile:
runtime (pseudo) Dockerfile:
Pros:
Cons:
Option 4: Define one runtime-deps Dockerfile per version with no hierarchy
This option effectively kills layer sharing by defining separate Dockerfiles for each .NET version that are separated from each other.
3.1 (pseudo) Dockerfile:
5.0 (pseudo) Dockerfile:
6.0 (pseudo) Dockerfile:
Pros:
Cons:
richlander commentedon Jun 7, 2021
We've traditionally had a problem with mixing stable and preview versions on the same package feed. How will that work for Mariner? I'm thinking that there are two assumptions of this plan:
Thoughts?
mthalman commentedon Jun 7, 2021
There's not a need to mix stable and preview versions in the package feed. What's available in the package feed has no impact on how the packages are installed in the Dockerfile because the RPMs are being installed directly rather from the package feed. From the first sentence in my previous post:
mthalman commentedon Jun 7, 2021
After an internal discussion, the consensus is to use Option 4: Define one runtime-deps Dockerfile per version with no hierarchy. This represents the canonical and recommended pattern for installing such a package dependency. The priority is for our Dockerfiles to represent how we would recommend customers to define their own such Dockerfiles. We shouldn't sacrifice that UX in order to reach the goal of layer sharing.
MichaelSimons commentedon Jun 9, 2021
[Triage]