Support referencing a Layer by Digest #325
Labels
Area: Layer
Area: Library
Tasks and stories around the image and layer manipulation library
Area: Task
enhancement
New feature or request
Partner request
Things that internal or external teams have explicitly requested
Milestone
Part of #316.
Layers for an image can come from many places - the base image, the direct content of the project being packaged, or an arbitrary registry. We should support defining new Layers to be included in the final image via MSBuild, and how those layers should be retrieved and included in the final layer.
MSBuild
A Layer reference consists of three pieces of data: the
Repository
the layer belongs to, theRegistry
the Repository is stored in, and theDigest
of the layer itself. We should support defining this in MSBuild. A proposed form of this could be:For example:
These Layers would be passed into the
CreateNewImage
Task and included in the image.API
The
Layer
class has several static factories, and the end result is making a combination of a Descriptor for the Layer and assigning a BackingFile for the layer (which can be done from the descriptor). The data from the Descriptor should be able to be retrieved by issuing aHEAD
request to thev2/{repository}/{digest}
endpoint - the GET at that same location returns the content while the HEAD would just give the metadata.Once the metadata is known, the actual
Registry.Push/LocalDaemon.Load
commands would be responsible for downloading and moving the layer across registries. This should be something already done by our current codepaths.Open question
Type
metadata to theContainerLayer
to give us a pivot for future evolution?ContainerLayer
creation (e.g. arbitrary filesystem globs)?The text was updated successfully, but these errors were encountered: