{"action":"created","comment":{"url":"https://api.github.com/repos/docker/distribution/pulls/comments/47388914","id":47388914,"diff_hunk":"@@ -0,0 +1,255 @@\n+# Image Manifest Version 2, Schema 2\n+\n+This document outlines the format of of the V2 image manifest, schema version 2.\n+The original (and provisional) image manifest for V2 (schema 1), was introduced\n+in the Docker daemon in the [v1.3.0\n+release](https://github.com/docker/docker/commit/9f482a66ab37ec396ac61ed0c00d59122ac07453)\n+and is specified in the [schema 1 manifest definition](./manifest-v2-1.md)\n+\n+This second schema version has two primary goals. The first is to allow\n+multi-architecture images, through a \"fat manifest\" which references image\n+manifests for platform-specific versions of an image. The second is to\n+move the Docker engine towards content-addressable images, by supporting\n+an image model where the image's configuration can be hashed to generate\n+an ID for the image.\n+\n+# Media Types\n+\n+The following media types are used by the manifest formats described here, and\n+the resources they reference:\n+\n+- `application/vnd.docker.distribution.manifest.v1+json`: schema1 (existing manifest format)\n+- `application/vnd.docker.distribution.manifest.v2+json`: New image manifest format (schemaVersion = 2)\n+- `application/vnd.docker.distribution.manifest.list.v2+json`: Manifest list, aka \"fat manifest\"\n+- `application/vnd.docker.image.rootfs.diff.tar.gzip`: \"Layer\", as a gzipped tar\n+- `application/vnd.docker.container.image.v1+json`: Container config JSON\n+\n+## Manifest List\n+\n+The manifest list is the \"fat manifest\" which points to specific image manifests\n+for one or more platforms. Its use is optional, and relatively few images will\n+use one of these manifests. A client will distinguish a manifest list from an\n+image manifest based on the Content-Type returned in the HTTP response.\n+\n+## *Manifest List* Field Descriptions\n+\n+- **`schemaVersion`** *int*\n+\t\n+  This field specifies the image manifest schema version as an integer. This\n+  schema uses the version `2`.\n+\n+- **`manifests`** *array*\n+\n+    The manifests field contains a list of manifests for specific platforms.\n+\n+    Fields of a object in the manifests list are:\n+    \n+    - **`mediatype`** *string*\n+    \n+        The MIME type of the referenced object. This will generally be\n+        `application/vnd.docker.image.manifest.v2+json`, but it could also\n+        be `application/vnd.docker.image.manifest.v1+json` if the manifest\n+        list references a legacy schema-1 manifest.\n+    \n+    - **`size`** *int*\n+    \n+        The size in bytes of the object. This field exists so that a client\n+        will have an expected size for the content before validating. If the\n+        length of the retrieved content does not match the specified length,\n+        the content should not be trusted.\n+    \n+    - **`digest`** *string*\n+\n+        The digest of the content, as defined by the\n+        [Registry V2 HTTP API Specificiation](https://docs.docker.com/registry/spec/api/#digest-parameter).\n+\n+    - **`platform`** *object*\n+\n+        The platform object describes the platform which the image in the\n+        manifest runs on.\n+\n+        - **`architecture`** *string*\n+\n+            The architecture field specifies the CPU architecture, for example\n+            `x86-64` or `ppc64`.\n+\n+        - **`os`** *string*\n+\n+            The architecture field specifies the operating system, for example\n+            `linux` or `windows`.\n+\n+        - **`variant`** *string*\n+\n+            The optional variant field specifies a variant of the CPU, for\n+            example `ppc64le` to specify a little-endian version of a PowerPC\n+            CPU.\n+\n+        - **`features`** *array*\n+\n+            The optional features field specifies an array of strings, each\n+            listing a required CPU feature (for example `sse4` or `aes`).\n+\n+## Example Manifest List\n+\n+*Example showing a simple manifest list pointing to image manifests for two platforms:*\n+```json\n+{\n+  \"schemaVersion\": 2,\n+  \"manifests\": [\n+    {\n+      \"mediatype\": \"application/vnd.docker.image.manifest.v2+json\",\n+      \"size\": 7143,\n+      \"digest\": \"sha256:e692418e4cbaf90ca69d05a66403747baa33ee08806650b51fab815ad7fc331f\",\n+      \"platform\": {\n+        \"architecture\": \"ppc64\",\n+        \"os\": \"linux\",\n+        \"variant\": \"ppc64le\",\n+      }\n+    },\n+    {\n+      \"mediatype\": \"application/vnd.docker.image.manifest.v2+json\",\n+      \"size\": 7682,\n+      \"digest\": \"sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270\",\n+      \"platform\": {\n+        \"architecture\": \"x86-64\",\n+        \"os\": \"linux\",\n+        \"features\": [\n+          \"sse4\"\n+        ]\n+      }\n+    }\n+  ]\n+}\n+```\n+\n+# Image Manifest\n+\n+The image manifest provides a configuration and a set of layers for a container\n+image. It's the direct replacement for the schema-1 manifest.\n+\n+## *Image Manifest* Field Descriptions\n+\n+- **`schemaVersion`** *int*\n+\t\n+  This field specifies the image manifest schema version as an integer. This\n+  schema uses version `2`.\n+\n+- **`config`** *object*\n+\n+    The config field references a configuration object for a container, by\n+    digest. This configuration item is a JSON blob that the runtime uses\n+    to set up the container. This new schema uses a tweaked version\n+    of this configuration to allow image content-addressability on the\n+    daemon side.\n+\n+    Fields of a config object are:\n+    \n+    - **`mediatype`** *string*\n+    \n+        The MIME type of the referenced object. This should generally be\n+        `application/vnd.docker.container.image.v1+json`.\n+    \n+    - **`size`** *int*\n+    \n+        The size in bytes of the object. This field exists so that a client\n+        will have an expected size for the content before validating. If the\n+        length of the retrieved content does not match the specified length,\n+        the content should not be trusted.\n+    \n+    - **`digest`** *string*\n+\n+        The digest of the content, as defined by the\n+        [Registry V2 HTTP API Specificiation](https://docs.docker.com/registry/spec/api/#digest-parameter).\n+\n+- **`layers`** *array*\n+\n+    The layer list is ordered starting from the base image (opposite order of schema1).\n+\n+    Fields of an item in the layers list are:\n+    \n+    - **`mediatype`** *string*\n+    \n+        The MIME type of the referenced object. This should\n+        generally be `application/vnd.docker.image.rootfs.diff.tar.gzip`.\n+    \n+    - **`size`** *int*\n+    \n+        The size in bytes of the object. This field exists so that a client","path":"docs/spec/manifest-v2-2.md","position":177,"original_position":177,"commit_id":"c68abe335c3fe1f92634ef6d1a851382885bd3b5","original_commit_id":"c68abe335c3fe1f92634ef6d1a851382885bd3b5","user":{"login":"aaronlehmann","id":10601430,"avatar_url":"https://avatars.githubusercontent.com/u/10601430?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronlehmann","html_url":"https://github.com/aaronlehmann","followers_url":"https://api.github.com/users/aaronlehmann/followers","following_url":"https://api.github.com/users/aaronlehmann/following{/other_user}","gists_url":"https://api.github.com/users/aaronlehmann/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronlehmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronlehmann/subscriptions","organizations_url":"https://api.github.com/users/aaronlehmann/orgs","repos_url":"https://api.github.com/users/aaronlehmann/repos","events_url":"https://api.github.com/users/aaronlehmann/events{/privacy}","received_events_url":"https://api.github.com/users/aaronlehmann/received_events","type":"User","site_admin":false},"body":"Yes, that's right. The typical flow when pushing a layer is to do a `HEAD` request first to see whether it already exists.","created_at":"2015-12-11T18:45:01Z","updated_at":"2015-12-11T18:45:01Z","html_url":"https://github.com/docker/distribution/pull/1068#discussion_r47388914","pull_request_url":"https://api.github.com/repos/docker/distribution/pulls/1068","_links":{"self":{"href":"https://api.github.com/repos/docker/distribution/pulls/comments/47388914"},"html":{"href":"https://github.com/docker/distribution/pull/1068#discussion_r47388914"},"pull_request":{"href":"https://api.github.com/repos/docker/distribution/pulls/1068"}}},"pull_request":{"url":"https://api.github.com/repos/docker/distribution/pulls/1068","id":46837664,"html_url":"https://github.com/docker/distribution/pull/1068","diff_url":"https://github.com/docker/distribution/pull/1068.diff","patch_url":"https://github.com/docker/distribution/pull/1068.patch","issue_url":"https://api.github.com/repos/docker/distribution/issues/1068","number":1068,"state":"open","locked":false,"title":"docs/spec: Proposal for new manifest format","user":{"login":"aaronlehmann","id":10601430,"avatar_url":"https://avatars.githubusercontent.com/u/10601430?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronlehmann","html_url":"https://github.com/aaronlehmann","followers_url":"https://api.github.com/users/aaronlehmann/followers","following_url":"https://api.github.com/users/aaronlehmann/following{/other_user}","gists_url":"https://api.github.com/users/aaronlehmann/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronlehmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronlehmann/subscriptions","organizations_url":"https://api.github.com/users/aaronlehmann/orgs","repos_url":"https://api.github.com/users/aaronlehmann/repos","events_url":"https://api.github.com/users/aaronlehmann/events{/privacy}","received_events_url":"https://api.github.com/users/aaronlehmann/received_events","type":"User","site_admin":false},"body":"This is a follow-on to PR #62, and it borrows much of the format\r\nfrom #993, but uses specific formats for the image manifest and manifest\r\nlist (fat manifest) instead of a combined generic format.\r\n\r\nThe intent of this proposed manifest format is to allow multi-arch, and\r\nallow for full content-addressability of images in the Docker engine.\r\n\r\nSigned-off-by: Aaron Lehmann <aaron.lehmann@docker.com>","created_at":"2015-10-05T21:40:13Z","updated_at":"2015-12-11T18:45:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ba9b5bc5134012b5633b6ec9f867bc977f93b1ee","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/docker/distribution/pulls/1068/commits","review_comments_url":"https://api.github.com/repos/docker/distribution/pulls/1068/comments","review_comment_url":"https://api.github.com/repos/docker/distribution/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/distribution/issues/1068/comments","statuses_url":"https://api.github.com/repos/docker/distribution/statuses/c68abe335c3fe1f92634ef6d1a851382885bd3b5","head":{"label":"aaronlehmann:manifest-proposal","ref":"manifest-proposal","sha":"c68abe335c3fe1f92634ef6d1a851382885bd3b5","user":{"login":"aaronlehmann","id":10601430,"avatar_url":"https://avatars.githubusercontent.com/u/10601430?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronlehmann","html_url":"https://github.com/aaronlehmann","followers_url":"https://api.github.com/users/aaronlehmann/followers","following_url":"https://api.github.com/users/aaronlehmann/following{/other_user}","gists_url":"https://api.github.com/users/aaronlehmann/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronlehmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronlehmann/subscriptions","organizations_url":"https://api.github.com/users/aaronlehmann/orgs","repos_url":"https://api.github.com/users/aaronlehmann/repos","events_url":"https://api.github.com/users/aaronlehmann/events{/privacy}","received_events_url":"https://api.github.com/users/aaronlehmann/received_events","type":"User","site_admin":false},"repo":{"id":38719418,"name":"distribution","full_name":"aaronlehmann/distribution","owner":{"login":"aaronlehmann","id":10601430,"avatar_url":"https://avatars.githubusercontent.com/u/10601430?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronlehmann","html_url":"https://github.com/aaronlehmann","followers_url":"https://api.github.com/users/aaronlehmann/followers","following_url":"https://api.github.com/users/aaronlehmann/following{/other_user}","gists_url":"https://api.github.com/users/aaronlehmann/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronlehmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronlehmann/subscriptions","organizations_url":"https://api.github.com/users/aaronlehmann/orgs","repos_url":"https://api.github.com/users/aaronlehmann/repos","events_url":"https://api.github.com/users/aaronlehmann/events{/privacy}","received_events_url":"https://api.github.com/users/aaronlehmann/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aaronlehmann/distribution","description":"The Docker toolset to pack, ship, store, and deliver content","fork":true,"url":"https://api.github.com/repos/aaronlehmann/distribution","forks_url":"https://api.github.com/repos/aaronlehmann/distribution/forks","keys_url":"https://api.github.com/repos/aaronlehmann/distribution/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aaronlehmann/distribution/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aaronlehmann/distribution/teams","hooks_url":"https://api.github.com/repos/aaronlehmann/distribution/hooks","issue_events_url":"https://api.github.com/repos/aaronlehmann/distribution/issues/events{/number}","events_url":"https://api.github.com/repos/aaronlehmann/distribution/events","assignees_url":"https://api.github.com/repos/aaronlehmann/distribution/assignees{/user}","branches_url":"https://api.github.com/repos/aaronlehmann/distribution/branches{/branch}","tags_url":"https://api.github.com/repos/aaronlehmann/distribution/tags","blobs_url":"https://api.github.com/repos/aaronlehmann/distribution/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aaronlehmann/distribution/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aaronlehmann/distribution/git/refs{/sha}","trees_url":"https://api.github.com/repos/aaronlehmann/distribution/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aaronlehmann/distribution/statuses/{sha}","languages_url":"https://api.github.com/repos/aaronlehmann/distribution/languages","stargazers_url":"https://api.github.com/repos/aaronlehmann/distribution/stargazers","contributors_url":"https://api.github.com/repos/aaronlehmann/distribution/contributors","subscribers_url":"https://api.github.com/repos/aaronlehmann/distribution/subscribers","subscription_url":"https://api.github.com/repos/aaronlehmann/distribution/subscription","commits_url":"https://api.github.com/repos/aaronlehmann/distribution/commits{/sha}","git_commits_url":"https://api.github.com/repos/aaronlehmann/distribution/git/commits{/sha}","comments_url":"https://api.github.com/repos/aaronlehmann/distribution/comments{/number}","issue_comment_url":"https://api.github.com/repos/aaronlehmann/distribution/issues/comments{/number}","contents_url":"https://api.github.com/repos/aaronlehmann/distribution/contents/{+path}","compare_url":"https://api.github.com/repos/aaronlehmann/distribution/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aaronlehmann/distribution/merges","archive_url":"https://api.github.com/repos/aaronlehmann/distribution/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aaronlehmann/distribution/downloads","issues_url":"https://api.github.com/repos/aaronlehmann/distribution/issues{/number}","pulls_url":"https://api.github.com/repos/aaronlehmann/distribution/pulls{/number}","milestones_url":"https://api.github.com/repos/aaronlehmann/distribution/milestones{/number}","notifications_url":"https://api.github.com/repos/aaronlehmann/distribution/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aaronlehmann/distribution/labels{/name}","releases_url":"https://api.github.com/repos/aaronlehmann/distribution/releases{/id}","created_at":"2015-07-07T23:02:33Z","updated_at":"2015-07-07T23:02:34Z","pushed_at":"2015-12-11T02:39:52Z","git_url":"git://github.com/aaronlehmann/distribution.git","ssh_url":"git@github.com:aaronlehmann/distribution.git","clone_url":"https://github.com/aaronlehmann/distribution.git","svn_url":"https://github.com/aaronlehmann/distribution","homepage":null,"size":7562,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"docker:master","ref":"master","sha":"dfe60f4cb1e1c40ab2d6fb21ed7358d950ab02e3","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":28366058,"name":"distribution","full_name":"docker/distribution","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker/distribution","description":"The Docker toolset to pack, ship, store, and deliver content","fork":false,"url":"https://api.github.com/repos/docker/distribution","forks_url":"https://api.github.com/repos/docker/distribution/forks","keys_url":"https://api.github.com/repos/docker/distribution/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/distribution/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/distribution/teams","hooks_url":"https://api.github.com/repos/docker/distribution/hooks","issue_events_url":"https://api.github.com/repos/docker/distribution/issues/events{/number}","events_url":"https://api.github.com/repos/docker/distribution/events","assignees_url":"https://api.github.com/repos/docker/distribution/assignees{/user}","branches_url":"https://api.github.com/repos/docker/distribution/branches{/branch}","tags_url":"https://api.github.com/repos/docker/distribution/tags","blobs_url":"https://api.github.com/repos/docker/distribution/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/distribution/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/distribution/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/distribution/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/distribution/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/distribution/languages","stargazers_url":"https://api.github.com/repos/docker/distribution/stargazers","contributors_url":"https://api.github.com/repos/docker/distribution/contributors","subscribers_url":"https://api.github.com/repos/docker/distribution/subscribers","subscription_url":"https://api.github.com/repos/docker/distribution/subscription","commits_url":"https://api.github.com/repos/docker/distribution/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/distribution/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/distribution/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/distribution/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/distribution/contents/{+path}","compare_url":"https://api.github.com/repos/docker/distribution/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/distribution/merges","archive_url":"https://api.github.com/repos/docker/distribution/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/distribution/downloads","issues_url":"https://api.github.com/repos/docker/distribution/issues{/number}","pulls_url":"https://api.github.com/repos/docker/distribution/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/distribution/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/distribution/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/distribution/labels{/name}","releases_url":"https://api.github.com/repos/docker/distribution/releases{/id}","created_at":"2014-12-22T23:49:26Z","updated_at":"2015-12-11T16:29:23Z","pushed_at":"2015-12-11T00:08:42Z","git_url":"git://github.com/docker/distribution.git","ssh_url":"git@github.com:docker/distribution.git","clone_url":"https://github.com/docker/distribution.git","svn_url":"https://github.com/docker/distribution","homepage":null,"size":10298,"stargazers_count":1443,"watchers_count":1443,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":543,"mirror_url":null,"open_issues_count":176,"forks":543,"open_issues":176,"watchers":1443,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/distribution/pulls/1068"},"html":{"href":"https://github.com/docker/distribution/pull/1068"},"issue":{"href":"https://api.github.com/repos/docker/distribution/issues/1068"},"comments":{"href":"https://api.github.com/repos/docker/distribution/issues/1068/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/distribution/pulls/1068/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/distribution/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/distribution/pulls/1068/commits"},"statuses":{"href":"https://api.github.com/repos/docker/distribution/statuses/c68abe335c3fe1f92634ef6d1a851382885bd3b5"}}}}