Add method for retrieving a V1-compatible manifest for any manifest or manifest list

This is used to serve older clients that don't support the V2 schema format
This commit is contained in:
Joseph Schorr 2018-11-13 10:40:57 +02:00
parent d77d383e46
commit 1b3daac3c3
7 changed files with 119 additions and 7 deletions

View file

@ -213,6 +213,7 @@ class DockerSchema2Config(object):
layer being last.
"""
history = list(self.history)
assert layer_index < len(history)
# If the layer is the leaf, it gets the full config (minus 2 fields). Otherwise, it gets only
# IDs.