Commit Graph

4 Commits

Author SHA1 Message Date
490ab536f0 Use assertions in image package unit tests.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: 69d7362058530d7dd97af29dc43fc4d55e73e776
Component: engine
2017-03-08 11:46:10 -05:00
d71866a5fc Fix incorrect info and format of error in image
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
Upstream-commit: b2ec509a3f9e50980fe3733500df56289c174252
Component: engine
2016-12-20 18:20:15 +08:00
bf504ef9d6 Add image store
The image store abstracts image handling. It keeps track of the
available images, and makes it possible to delete existing images or
register new ones. The image store holds references to the underlying
layers for each image.

The image/v1 package provides compatibility functions for interoperating
with older (non-content-addressable) image structures.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 01ba0a935b9227583ec05a96e85273cc2276bb93
Component: engine
2015-11-24 09:40:24 -08:00
eb67a37877 Calculate hash based image IDs on pull
Generate a hash chain involving the image configuration, layer digests,
and parent image hashes. Use the digests to compute IDs for each image
in a manifest, instead of using the remotely specified IDs.

To avoid breaking users' caches, check for images already in the graph
under old IDs, and avoid repulling an image if the version on disk under
the legacy ID ends up with the same digest that was computed from the
manifest for that image.

When a calculated ID already exists in the graph but can't be verified,
continue trying SHA256(digest) until a suitable ID is found.

"save" and "load" are not changed to use a similar scheme. "load" will
preserve the IDs present in the tar file.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 504e67b867865a2835e8002c01087a2cfd7bfd0e
Component: engine
2015-10-12 10:51:28 -07:00