dockerTools: fix image json and manifest
The image json is not exactly the same as the layer json, therefore I changed the implementation to use the `baseJson` which doesn’t include layer specific details like `id`, `size` or the checksum of the layer. Also the `history` entry was missing in the image json. I’m not totally sure if this field is required, but a I got an error from a docker registry when I’ve tried to receive the distribution manifest of an image without those `history` entry: GET: `http://<registry-host>/v2/<imageName>/manifests/<imageTag>` ```json { "errors": [ { "code": "MANIFEST_INVALID", "message": "manifest invalid", "detail": {} } ] } ``` I’ve also used a while loop to iterate over all layers which should make sure that the order of the layers is correct. Previously `find` was used and I’m not sure if the order was always correct.
parent
f6817ddf
Please register or sign in to comment