Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign manifest schema to more easily reuse platforms #664

Closed
mthalman opened this issue Sep 30, 2020 · 3 comments
Closed

Redesign manifest schema to more easily reuse platforms #664

mthalman opened this issue Sep 30, 2020 · 3 comments

Comments

@mthalman
Copy link
Member

The changes outlined in dotnet/dotnet-docker#2182 require having multiple distinct sets of manifest tags associated with a given platform. For example, the Dockerfile at https://github.com/dotnet/dotnet-docker/blob/aa8e95b22897ed44f6ba359e2a1d74ed9caca03f/src/runtime/5.0/buster-slim/amd64/Dockerfile would have two separate sets of manifest tags associated with it:

  • 5.0.0-rc.2, 5.0, latest
  • 5.0.0-rc.2-buster-slim, 5.0-buster-slim

The schema currently doesn't support being able to define more than 1 set of manifest tags for a given platform without having to duplicate the platform definition. This is because manifest tags are defined by an image and images contain platforms.

In order to avoid duplication of platforms across the manifest, it'd be better if the manifest schema could be redesigned to better support this scenario.

@mthalman
Copy link
Member Author

mthalman commented Oct 2, 2020

To compensate for not having this implemented, a strategy was taken to duplicate platforms within the manifest so that they could have multiple sets of shared tags associated with them. Some changes to Image Builder were made to handle this (see below). As part of the implementation of the schema change proposed in this issue, we should determine whether these other changes can be removed.

#665
#666
#667
#672

@mthalman
Copy link
Member Author

mthalman commented Oct 20, 2020

Another scenario for platform reuse -- and image reuse as well -- is the need to be able to tag a given image with tags that consist of multiple repos (e.g. syndication: dotnet/dotnet-docker#2317).

This would then argue for a design that decouples images from repos and platforms from images so that they can be mixed and matched to produce the desired state. If we're going to do the work to redesign the manifest, we might as well go all the way to be able to handle these scenarios.

For completeness, here's a set of scenarios that it would make sense to support with a schema change that doesn't require duplication of elements:

  • Associate multiple distinct sets of manifest tags with a given platform.
    • Example: an image could be assigned the following sets of manifest tags: 5.0.0-rc.2, 5.0, latest and 5.0.0-rc.2-buster-slim, 5.0-buster-slim.
  • Tag an image across multiple repos.
    • Example: an image could be tagged with mcr.microsoft.com/dotnet/core/runtime:3.1-buster-slim and mcr.microsoft.com/dotnet/runtime:3.1-buster-slim.
  • Publish an image whose only documented tag is a manifest tag.

@mthalman
Copy link
Member Author

This is not needed anymore. The primary desire for this was to help with the issue of associating a Dockerfile with more than set of shared tags. But we no longer have a need to reuse platforms in this way now that we've removed Windows from the shared tags. Also see dotnet/dotnet-docker#4575. The other scenarios listed at #664 (comment) are still valid but of lesser importance.

@mthalman mthalman closed this as not planned Won't fix, can't repro, duplicate, stale Apr 19, 2023
@github-project-automation github-project-automation bot moved this from Needs Review to Done in .NET Docker Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

2 participants