{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/17924","labels_url":"https://api.github.com/repos/docker/docker/issues/17924/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/17924/comments","events_url":"https://api.github.com/repos/docker/docker/issues/17924/events","html_url":"https://github.com/docker/docker/pull/17924","id":116459479,"number":17924,"title":"Content addressability","user":{"login":"tonistiigi","id":585223,"avatar_url":"https://avatars.githubusercontent.com/u/585223?v=3","gravatar_id":"","url":"https://api.github.com/users/tonistiigi","html_url":"https://github.com/tonistiigi","followers_url":"https://api.github.com/users/tonistiigi/followers","following_url":"https://api.github.com/users/tonistiigi/following{/other_user}","gists_url":"https://api.github.com/users/tonistiigi/gists{/gist_id}","starred_url":"https://api.github.com/users/tonistiigi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tonistiigi/subscriptions","organizations_url":"https://api.github.com/users/tonistiigi/orgs","repos_url":"https://api.github.com/users/tonistiigi/repos","events_url":"https://api.github.com/users/tonistiigi/events{/privacy}","received_events_url":"https://api.github.com/users/tonistiigi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/docker/labels/group/distribution","name":"group/distribution","color":"F6FBFF"},{"url":"https://api.github.com/repos/docker/docker/labels/group/windows","name":"group/windows","color":"F6FBFF"},{"url":"https://api.github.com/repos/docker/docker/labels/status/2-code-review","name":"status/2-code-review","color":"fad8c7"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/docker/docker/milestones/44","html_url":"https://github.com/docker/docker/milestones/1.10","labels_url":"https://api.github.com/repos/docker/docker/milestones/44/labels","id":1351533,"number":44,"title":"1.10","description":"","creator":{"login":"thaJeztah","id":1804568,"avatar_url":"https://avatars.githubusercontent.com/u/1804568?v=3","gravatar_id":"","url":"https://api.github.com/users/thaJeztah","html_url":"https://github.com/thaJeztah","followers_url":"https://api.github.com/users/thaJeztah/followers","following_url":"https://api.github.com/users/thaJeztah/following{/other_user}","gists_url":"https://api.github.com/users/thaJeztah/gists{/gist_id}","starred_url":"https://api.github.com/users/thaJeztah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thaJeztah/subscriptions","organizations_url":"https://api.github.com/users/thaJeztah/orgs","repos_url":"https://api.github.com/users/thaJeztah/repos","events_url":"https://api.github.com/users/thaJeztah/events{/privacy}","received_events_url":"https://api.github.com/users/thaJeztah/received_events","type":"User","site_admin":false},"open_issues":10,"closed_issues":17,"state":"open","created_at":"2015-10-12T18:21:55Z","updated_at":"2015-11-23T16:57:47Z","due_on":null,"closed_at":null},"comments":54,"created_at":"2015-11-12T01:24:15Z","updated_at":"2015-11-23T22:00:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/17924","html_url":"https://github.com/docker/docker/pull/17924","diff_url":"https://github.com/docker/docker/pull/17924.diff","patch_url":"https://github.com/docker/docker/pull/17924.patch"},"body":"This PR changes the Docker engine to use content addressable storage for images and layers. This means that image IDs are no longer arbitrarily assigned - now they are computed based on the filesystem contents and the image configuration. Images can securely share their underlying layers without duplicating data on disk.\r\n\r\nThis work involves a big refactoring of image-related code in the engine. The `graph` package is entirely removed, and is replaced by a few new packages:\r\n\r\n- `layer`: Layer store interface and implementation. This manages filesystem layers without being aware of image configurations. The layer store maintains reference counts for layers and removes unreferenced layers.\r\n- `image`: Image store interface and implementation. This manages image configurations. Image configurations include runtime configuration and reference the underlying filesystem data.\r\n- `tag`: The tag functionality from the `graph` package has been separated out and moved here. Tags now use types from the `distribution/reference` package instead of plain strings.\r\n- `distribution`: Push and pull code that originally was part of the `graph` package has been separated out into its own package.\r\n\r\nThe first time a version of the engine with these commits is started, it will migrate old graph metadata to the new format. This involves calculating content hashes for the existing data, but it does not move underlying graphdriver filesystem data. It doesn’t remove old graph metadata, so the migration process is not destructive.\r\n\r\nThe new data model does not have a one-to-one relationship between images and layers. A single image can have many layers. Existing versions of Docker create an image for each layer, and use the parent chain to link them together. That means that pulling a specific image requires pulling all the artifacts from the original build process of that image. With this PR, when an image is pulled from a registry, only a single image is created, to match the new data model. The history is preserved through a list of commands, dates, etc.\r\n\r\n#### Summary of UI Changes:\r\n\r\n- Pull/push do not transfer the entire parent chain.\r\n- Full-length image IDs have a `sha256:` prefix. This prefix is hidden for truncated image IDs for convenience.\r\n- Images don't have the concept of VirtualSize (because there’s no special meaning for a top layer anymore).\r\n\r\n#### Future work:\r\n\r\n- Add support for new manifest format for push/pull: https://github.com/docker/distribution/pull/1068\r\n- Move graphdriver initialization/shutdown out of daemon.\r\n- Move some layer, image, and distribution code out of docker/docker (remove dependencies on Engine code as necessary).\r\n- Additional changes needed for managing the Windows base layer.\r\n\r\n#### Unit test coverage for the new packages:\r\n```\r\nok  \tgithub.com/docker/docker/image\t0.051s\tcoverage: 85.8% of statements\r\nok  \tgithub.com/docker/docker/layer\t0.223s\tcoverage: 76.0% of statements\r\nok  \tgithub.com/docker/docker/migrate/v1\t0.033s\tcoverage: 71.1% of statements\r\nok  \tgithub.com/docker/docker/tag\t0.017s\tcoverage: 86.1% of statements\r\n```\r\n\r\nFor the full design document, see https://gist.github.com/aaronlehmann/b42a2eaf633fc949f93b\r\n"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/159079107","html_url":"https://github.com/docker/docker/pull/17924#issuecomment-159079107","issue_url":"https://api.github.com/repos/docker/docker/issues/17924","id":159079107,"user":{"login":"LK4D4","id":101445,"avatar_url":"https://avatars.githubusercontent.com/u/101445?v=3","gravatar_id":"","url":"https://api.github.com/users/LK4D4","html_url":"https://github.com/LK4D4","followers_url":"https://api.github.com/users/LK4D4/followers","following_url":"https://api.github.com/users/LK4D4/following{/other_user}","gists_url":"https://api.github.com/users/LK4D4/gists{/gist_id}","starred_url":"https://api.github.com/users/LK4D4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LK4D4/subscriptions","organizations_url":"https://api.github.com/users/LK4D4/orgs","repos_url":"https://api.github.com/users/LK4D4/repos","events_url":"https://api.github.com/users/LK4D4/events{/privacy}","received_events_url":"https://api.github.com/users/LK4D4/received_events","type":"User","site_admin":false},"created_at":"2015-11-23T22:00:14Z","updated_at":"2015-11-23T22:00:14Z","body":"My opinion, that it should be tried in this PR. Because what if it'll be very hard or impossible to do? Revert will be not so easy."}}