area/performancearea/securityarea/usabilitycomponent/stage0component/storehelp wantedkind/enhancementpriority/P1
説明
Today to pull and store docker images we use docker2aci which flattens a docker image into a single ACI image and then places it into the rkt store. This made sense when we started working on Docker integration at the time because Docker images did not have a content-addressable ID. Today, Docker images do have a CAS address so we should consider storing each layer in our own store using that address.
This will have a few advantages:
- We can take advantage of cache hits when someone tries to download an image with a content-address we already have
- We can avoid the costly content conversion of taking all of the layers and flattening the image
- A user could reference or run a docker image by its CAS id.
Now, there are a number of things to sort out such as:
- How do we support multiple CAS types, for example docker addresses are sha256
- Do we create an ACI that just references the other layers and converts only the v1 image config? https://github.com/docker/docker/blob/master/image/spec/v1.md#image-json-description