Change manifest creation to take in the map of blobs that form the manifest
We need to lookup the blobs *specific to the images in that manifest*, so we now pass them in from the locations in which we know that information
This commit is contained in:
parent
e3da522d26
commit
56222f95dc
8 changed files with 89 additions and 43 deletions
|
@ -65,15 +65,17 @@ def create_image(docker_image_id, repository_obj, username):
|
|||
|
||||
def store_tag_manifest(namespace, repo_name, tag_name, image_id):
|
||||
builder = DockerSchema1ManifestBuilder(namespace, repo_name, tag_name)
|
||||
storage_id_map = {}
|
||||
try:
|
||||
image_storage = ImageStorage.select().where(~(ImageStorage.content_checksum >> None)).get()
|
||||
builder.add_layer(image_storage.content_checksum, '{"id": "foo"}')
|
||||
storage_id_map[image_storage.content_checksum] = image_storage.id
|
||||
except ImageStorage.DoesNotExist:
|
||||
pass
|
||||
|
||||
manifest = builder.build(docker_v2_signing_key)
|
||||
manifest_row, _ = model.tag.store_tag_manifest_for_testing(namespace, repo_name, tag_name,
|
||||
manifest, leaf_layer_id=image_id)
|
||||
manifest, image_id, storage_id_map)
|
||||
return manifest_row
|
||||
|
||||
|
||||
|
|
Reference in a new issue