nixpkgs/pkgs/build-support/docker
Mathias Schreck 86d9b09c9b 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.
2017-08-03 11:52:03 +02:00
..
default.nix dockerTools: fix image json and manifest 2017-08-03 11:52:03 +02:00
detjson.py
examples.nix docker tools: fix pull image function 2017-05-26 18:48:16 +02:00
pull.nix docker tools: fix pull image function 2017-05-26 18:48:16 +02:00
pull.sh docker tools: fix pull image function 2017-05-26 18:48:16 +02:00
tarsum.go dockerTools: disable compression in tarsum.go 2016-07-02 02:22:36 -04:00