Skip to content

Proposal for versioned samples images #4932

Closed

Description

@lbussell

Describe the Problem

Some customers have expressed the desire for accessing old versions of samples in the dotnet/samples repo. We want .NET 8.0 samples to be compatible with older samples versions but still want to publish new samples with the latest .NET Docker features/best practices.

Proposal

  • Keep both dotnetapp and aspnetapp samples in the same dotnet/samples repo. This promotes visibility between different types of samples and also allows us to introduce more types of samples in the future with less overhead.
  • Keep the floating tags published using traditional, rootful containers with a shell.
    • Consider moving to non-root or distroless for a future release.
  • Add a new tag with a version suffix to all samples. This can be undocumented if necessary.
    • The new full tag structure would be (sample app name)-(optional sample variant)-(.NET major version)-(os)-(arch).
    • For each versioned tag, there should also be a floating versionless tag that we will point customers to. (sample name)-(variant)

Tags

I have provided several examples of the proposed tagging scheme below. The list is not exhaustive, the idea is just to provide some examples of how we could publish different types of samples with this naming scheme.

Old Tags New Tags OS
aspnetapp, aspnetapp-alpine-amd64 aspnetapp, aspnetapp-8.0, aspnetapp-8.0-alpine3.18, aspnetapp-8.0-alpine3.18-amd64 Alpine 3.18
Not published aspnetapp-composite, aspnetapp-composite-8.0, aspnetapp-8.0-jammy-chiseled, aspnetapp-8.0-jammy-chiseled-amd64 Jammy Chiseled
Not published aspnetapp-aot, aspnetapp-aot-8.0, aspnetapp-aot-8.0-jammy-chiseled, aspnetapp-aot-8.0-jammy-chiseled-amd64 Jammy Chiseled
Not published aspnetapp-chiseled, aspnetapp-chiseled-8.0...
OR aspnetapp-distroless, aspnetapp-distroless-8.0...
Jammy Chiseled
etc.
dotnetapp dotnetapp, dotnetapp-alpine?, dotnetapp-8.0, dotnetapp-8.0-alpine3.18, dotnetapp-8.0-alpine3.18-amd64 Alpine 3.18
Not published dotnetapp-ubuntu-chiseled?, dotnetapp-8.0-jammy-chiseled, dotnetapp-8.0-jammy-chiseled, dotnetapp-8.0-jammy-chiseled-amd64 Jammy Chiseled
Not published dotnetapp-aot, dotnetapp-aot-8.0, dotnetapp-aot-8.0-jammy-chiseled, dotnetapp-aot-8.0-jammy-chiseled-amd64 Jammy Chiseled

Activity

  1. lbussell commented on Oct 11, 2023

    @lbussell
    MemberAuthor

    Updated the tag listings to include OS versions.

  2. lbussell commented on Nov 17, 2023

    @lbussell
    MemberAuthor

    Here is a greatly simplified proposal based on working with @richlander:

    Old Tags New Tags OS
    aspnetapp, aspnetapp-alpine-<arch> aspnetapp, aspnetapp-8.0, aspnetapp-8.0-alpine-<arch> Alpine
    aspnetapp-chiseled, aspnetapp-chiseled-8.0, aspnetapp-chiseled-8.0-<arch> Ubuntu Chiseled
    dotnetapp, dotnetapp-alpine-<arch> dotnetapp, dotnetapp-8.0, dotnetapp-8.0-alpine-<arch> Alpine
    dotnetapp-chiseled, dotnetapp-chiseled-8.0, dotnetapp-8.0-chiseled-<arch> Ubuntu Chiseled

    The intention of having a versioned multi-platform tag (e.g. aspnetapp-8.0) is so that in the future, it would be easy to compare samples across .NET versions to see startup time and/or size differences, using a simple and accessible tag. I am not super attached to that idea so I could be convinced to remove it.

  3. lbussell commented on Jan 11, 2024

    @lbussell
    MemberAuthor

    [Triage] After some discussion, we think it would be best to leave Alpine as default so that users can inspect the image with a shell. The Chiseled samples should not be shipped with the addition of a shell since that is a design goal for the Chiseled images and we want to accurately portray the final product that a user might get when using them.

  4. moved this from Backlog to Current Release in .NET Dockeron Jan 11, 2024
  5. richlander commented on Jan 16, 2024

    @richlander
    Member

    Agree. I key change we need is to set the USER in the aspnetapp sample.

  6. lbussell commented on Jan 18, 2024

    @lbussell
    MemberAuthor

    Agree. I key change we need is to set the USER in the aspnetapp sample.

    [Triage] We should leave the user as root in .NET 8 and switch it to non-root in .NET 9.

  7. added this to the .NET 9 milestone on Jan 20, 2024
  8. moved this from Current Release to Sprint in .NET Dockeron Jan 20, 2024
  9. removed this from the .NET 9 Features milestone on Jan 23, 2024
  10. moved this from Sprint to In Progress in .NET Dockeron Jan 24, 2024
  11. moved this from In Progress to Rollout in .NET Dockeron Feb 1, 2024
  12. lbussell commented on Feb 14, 2024

    @lbussell
    MemberAuthor

    Versioned samples and Ubuntu Chiseled are now available with #5185

    https://mcr.microsoft.com/en-us/product/dotnet/samples/about

    docker pull mcr.microsoft.com/dotnet/samples:aspnetapp-chiseled-8.0

    Image

  13. moved this from Rollout to Done in .NET Dockeron Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions