Originally from https://blog.docker.com/2016/01/docker-1-10-rc/
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,84 @@ |
| 0 |
+<!--[metadata]> |
|
| 1 |
+title = "Migrate to Engine 1.10" |
|
| 2 |
+description = "Migrate to Engine 1.10" |
|
| 3 |
+keywords = ["docker, documentation, engine, upgrade, migration"] |
|
| 4 |
+[menu.main] |
|
| 5 |
+parent = "engine_use" |
|
| 6 |
+weight=79 |
|
| 7 |
+<![end-metadata]--> |
|
| 8 |
+ |
|
| 9 |
+# Migrate to Engine 1.10 |
|
| 10 |
+ |
|
| 11 |
+Starting from version 1.10 of Docker Engine, we completely change the way image |
|
| 12 |
+data is addressed on disk. Previously, every image and layer used a randomly |
|
| 13 |
+assigned UUID. In 1.10 we implemented a content addressable method using an ID, |
|
| 14 |
+based on a secure hash of the image and layer data. |
|
| 15 |
+ |
|
| 16 |
+The new method gives users more security, provides a built-in way to avoid ID |
|
| 17 |
+collisions and guarantee data integrity after pull, push, load, or save. It also |
|
| 18 |
+brings better sharing of layers by allowing many images to freely share their |
|
| 19 |
+layers even if they didn’t come from the same build. |
|
| 20 |
+ |
|
| 21 |
+Addressing images by their content also lets us more easily detect if something |
|
| 22 |
+has already been downloaded. Because we have separated images and layers, you |
|
| 23 |
+don’t have to pull the configurations for every image that was part of the |
|
| 24 |
+original build chain. We also don’t need to create layers for the build |
|
| 25 |
+instructions that didn’t modify the filesystem. |
|
| 26 |
+ |
|
| 27 |
+Content addressability is the foundation for the new distribution features. The |
|
| 28 |
+image pull and push code has been reworked to use a download/upload manager |
|
| 29 |
+concept that makes pushing and pulling images much more stable and mitigate any |
|
| 30 |
+parallel request issues. The download manager also brings retries on failed |
|
| 31 |
+downloads and better prioritization for concurrent downloads. |
|
| 32 |
+ |
|
| 33 |
+We are also introducing a new manifest format that is built on top of the |
|
| 34 |
+content addressable base. It directly references the content addressable image |
|
| 35 |
+configuration and layer checksums. The new manifest format also makes it |
|
| 36 |
+possible for a manifest list to be used for targeting multiple |
|
| 37 |
+architectures/platforms. Moving to the new manifest format will be completely |
|
| 38 |
+transparent. |
|
| 39 |
+ |
|
| 40 |
+## Preparing for upgrade |
|
| 41 |
+ |
|
| 42 |
+To make your current images accessible to the new model we have to migrate them |
|
| 43 |
+to content addressable storage. This means calculating the secure checksums for |
|
| 44 |
+your current data. |
|
| 45 |
+ |
|
| 46 |
+All your current images, tags and containers are automatically migrated to the |
|
| 47 |
+new foundation the first time you start Docker Engine 1.10. Before loading your |
|
| 48 |
+container, the daemon will calculate all needed checksums for your current data, |
|
| 49 |
+and after it has completed, all your images and tags will have brand new secure |
|
| 50 |
+IDs. |
|
| 51 |
+ |
|
| 52 |
+**While this is simple operation, calculating SHA256 checksums for your files |
|
| 53 |
+can take time if you have lots of image data.** On average you should assume |
|
| 54 |
+that migrator can process data at a speed of 100MB/s. During this time your |
|
| 55 |
+Docker daemon won’t be ready to respond to requests. |
|
| 56 |
+ |
|
| 57 |
+## Minimizing migration time |
|
| 58 |
+ |
|
| 59 |
+If you can accept this one time hit, then upgrading Docker Engine and restarting |
|
| 60 |
+the daemon will transparently migrate your images. However, if you want to |
|
| 61 |
+minimize the daemon’s downtime, a migration utility can be run while your old |
|
| 62 |
+daemon is still running. |
|
| 63 |
+ |
|
| 64 |
+This tool will find all your current images and calculate the checksums for |
|
| 65 |
+them. After you upgrade and restart the daemon, the checksum data of the |
|
| 66 |
+migrated images will already exist, freeing the daemon from that computation |
|
| 67 |
+work. If new images appeared between the migration and the upgrade, those will |
|
| 68 |
+be processed at time of upgrade to 1.10. |
|
| 69 |
+ |
|
| 70 |
+[You can download the migration tool |
|
| 71 |
+here.](https://github.com/docker/v1.10-migrator/releases) |
|
| 72 |
+ |
|
| 73 |
+The migration tool can also be run as a Docker image. While running the migrator |
|
| 74 |
+image you need to expose your Docker data directory to the container. If you use |
|
| 75 |
+the default path then you would run: |
|
| 76 |
+ |
|
| 77 |
+ $ docker run --rm -v /var/lib/docker:/var/lib/docker docker/v1.10-migrator |
|
| 78 |
+ |
|
| 79 |
+If you use the |
|
| 80 |
+devicemapper storage driver, you also need to pass the flag `--privileged` to |
|
| 81 |
+give the tool access to your storage devices. |