@@ -43,69 +43,12 @@ new files, modifying existing files, and deleting files, are written to this thi
4343writable container layer. The diagram below shows a container based on the Ubuntu
444415.04 image.
4545
46- The diagram below shows a container with the Ubuntu 15.04 image comprising 4
47- stacked image layers, and the writable container layer on top.
48-
4946![ Docker image layers] ( images/container-layers.jpg )
5047
5148A _ storage driver_ handles the details about the way these layers interact with
5249each other. Different storage drivers are available, which have advantages
5350and disadvantages in different situations.
5451
55- ### Content addressable storage
56-
57- If you are already running Docker 1.10 or higher, you can skip this section and
58- go straight to [ Containers and layers] ( #containers-and-layers ) .
59-
60- Docker 1.10 introduced a new content addressable storage model. This is a
61- completely new way to address image and layer data on disk. Previously, image
62- and layer data was referenced and stored using a randomly generated UUID. In
63- the new model this is replaced by a secure * content hash* .
64-
65- The new model improves security, provides a built-in way to avoid ID
66- collisions, and guarantees data integrity after pull, push, load, and save
67- operations. It also enables better sharing of layers by allowing many images to
68- freely share their layers even if they didn’t come from the same build.
69-
70- The diagram below shows an updated version of the previous diagram,
71- highlighting the changes implemented by Docker 1.10.
72-
73- ![ ] ( images/container-layers-cas.jpg )
74-
75- All image layer IDs are cryptographic hashes, whereas the container ID is still
76- a randomly generated UUID.
77-
78- The new model requires you to migrate existing images from Docker 1.9 and
79- earlier, and it includes several changes to the filesystem structure of images
80- and layers. If you are already running Docker 1.10 or higher, you can skip this
81- section.
82-
83- Images created within Docker 1.9 or earlier need to be migrated before they can
84- be used with the new model. This migration involves calculating new secure
85- checksums and is performed automatically the first time you start an updated
86- Docker daemon. After the migration is complete, all images and tags will have
87- brand new secure IDs.
88-
89- Although the migration is automatic and transparent, it is computationally
90- intensive. It may take some time to complete, and during this time, Docker will
91- not respond to other requests. If this is a problem, you can use a
92- [ migration tool] ( https://github.com/docker/v1.10-migrator/releases ) to migrate
93- existing images to the new format before upgrading Docker. This avoids
94- downtime and allows you to distribute migrated images to systems that have
95- already been upgraded. For more information, see
96- [ https://github.com/docker/v1.10-migrator/releases ] ( https://github.com/docker/v1.10-migrator/releases ) .
97-
98- During the migration, you need to expose your Docker host's data directory to
99- the migration container. If you are using the default Docker data path, use a
100- command like the following:
101-
102- ``` bash
103- $ sudo docker run --rm -v /var/lib/docker:/var/lib/docker docker/v1.10-migrator
104- ```
105-
106- If you use the ` devicemapper ` storage driver, you need to include the
107- ` --privileged ` option so that the container has access to your storage devices.
108-
10952## Container and layers
11053
11154The major difference between a container and an image is the top writable layer.
0 commit comments