As a user, I can upload a schema 2 manifest with blobs
Since docker's v2 registry API and associated data formats were released, it has not been possible to "docker save" a v2 image and retain the v2 data structures. Lacking a standard on-disk representation for a v2 image, it has not been possible for Pulp to receive an uploaded image.
This particularly impacts an image build workflow. An image must be built with docker engine, then pushed to a transient registry, and then sync'd by Pulp.
Skopeo  is a tool that can extract an image from docker engine directly and write it to disk. The on-disk representation is very simple (a manifest.json file, plus related blob files in a flat directory) and can be used as a de-facto standard.
A user will be able to:
- "docker build" an image
- "skopeo copy" that image to a directory
- tar and upload that directory to Pulp
Pulp's docker plugin will need the importer to:
- untar the upload file
- recognize the file as containing a v2 schema 2 image
- import the manifest and blobs
- optionally receive a tag name to apply to the imported manifest
Skopeo does not yet support writing out schema 1 manifests to disk, so that is out of scope for this story.
This story does not require any changes to publishing or to crane.
After this story is successfully implemented, it will be possible to add Pulp as an destination type in skopeo. In that case, a user could do something along the lines of:
skopeo copy docker://myimage:2.0.0 pulp://example.com/myimage
The skopeo work is not part of this story, but it is useful for illustrating the value of this feature.
#1 Updated by email@example.com over 4 years ago
w/r to the tags i think it worth mentioning in the story details, same for docs, that 'skopeo copy' looses all tags related to the copied repo, that's why user would need to optionally provide the tags during the upload for desired image manifests. Or he would have the chance to tag the image manifest later, once it was uploaded into Pulp.