Fix layer ordering in verbs
This commit is contained in:
parent
9039026ebe
commit
95c47fe250
1 changed files with 6 additions and 1 deletions
|
@ -31,6 +31,10 @@ def _open_stream(formatter, namespace, repository, tag, synthetic_image_id, imag
|
|||
image_list = list(model.image.get_parent_images(namespace, repository, repo_image))
|
||||
image_list.append(repo_image)
|
||||
|
||||
# Note: The image list ordering must be from top-level image, downward, so we reverse the order
|
||||
# here.
|
||||
image_list.reverse()
|
||||
|
||||
def get_next_image():
|
||||
for current_image in image_list:
|
||||
yield current_image
|
||||
|
@ -42,7 +46,8 @@ def _open_stream(formatter, namespace, repository, tag, synthetic_image_id, imag
|
|||
current_image_path)
|
||||
|
||||
current_image_id = current_image_entry.id
|
||||
logger.debug('Returning image layer %s: %s', current_image_id, current_image_path)
|
||||
logger.debug('Returning image layer %s (%s): %s', current_image_id,
|
||||
current_image_entry.docker_image_id, current_image_path)
|
||||
yield current_image_stream
|
||||
|
||||
stream = formatter.build_stream(namespace, repository, tag, synthetic_image_id, image_json,
|
||||
|
|
Reference in a new issue