Story #1050
Updated by mhrivnak over 9 years ago
Crane must implement the "docker pull" v2 API. This includes: <pre>GET /v2/</pre> must return 200 and the custom "Docker-Distribution-API-Version" header with value "registry/2.0". <pre>GET /v2/<name>/<path></pre> must redirect to the corresponding base URL defined for the <code><name></code> joined with the relative <code><path></code>. The "redirect files" that crane uses to load data about repositories has been updated for docker V2. The schema for this data file has been bumped to "2", with details here: https://github.com/pulp/pulp_docker/blob/docker_v2_api/docs/tech-reference/distributor.rst#v2-redirect-file It may be easiest to store these in a new in-memory data structure. So when loading data files, if it is a V1 file keep the current behavior, and if it's a V2 file add the data to a new but similar structure. Then they can be accessed separately by request handlers for /v1 and /v2. In theory, one repo could have content both under /v1 and /v2. To facilitate easier organization of v1 vs. v2 data files, it is important that crane be able to load them from anywhere within its configured data_dir. So it should look for all json blobs within that directory and any subdirectories, and load them as data files. <pre> GET /v2/ GET /v2/<name>/manifests/<reference> GET /v2/<name>/blobs/<digest> GET /v2/<name>/tags/list </pre> Reference: https://github.com/docker/distribution/blob/master/docs/spec/api.md