You mention "AUFS" but the issue unrelated to storage drivers.
Prior to v1.10.0, docker would download an image along with all of its intermediate layers. Using docker history <image_id>
you could get the intermediate layer IDs. Then you could explore the /var/lib/docker/<storage_driver>/
directory to see the changes introduced by each intermediate layer, or you could even start a container from any one of them.
This is no longer the case according to https://github.com/moby/moby/issues/20131:
"...We don't pull parent images anymore. You only
have them if you built the image yourself or if you migrated your old
image chains."
Note that docker history
now outputs <missing>
instead of the image ID for each unavailable intermediate layer.
$ docker history ubuntu
IMAGE CREATED CREATED BY SIZE COMMENT
ccc7a11d65b1 2 weeks ago /bin/sh -c #(nop) CMD ["/bin/bash"] 0B
<missing> 2 weeks ago /bin/sh -c mkdir -p /run/systemd && echo '... 7B
<missing> 2 weeks ago /bin/sh -c sed -i 's/^#\s*\(deb.*universe\... 2.76kB
<missing> 2 weeks ago /bin/sh -c rm -rf /var/lib/apt/lists/* 0B
<missing> 2 weeks ago /bin/sh -c set -xe && echo '#!/bin/sh' >... 745B
<missing> 2 weeks ago /bin/sh -c #(nop) ADD file:39d3593ea220e68... 120MB
More information here: https://github.com/moby/moby/wiki/Engine-v1.10.0-content-addressability-migration
That being said, if you have access to the Dockerfile and the supporting resources that were used to build the image, you can build the image locally (which will save each intermediate layer)
Ubuntu publishes its Dockerfiles here:
https://hub.docker.com/_/ubuntu/
So if you wanted to build a 17.10 image for examples you would:
- Create a build directory
- Copy the Dockerfile to the build directory.
- Copy supporting resources to the build directory
In this case the dockerfile contains the following command:
ADD ubuntu-artful-core-cloudimg-amd64-root.tar.gz /
You can find that file with a Google search
Note: The ADD command automatically extracts and unzips recognized formats.
- cd to the build directory and run
docker build .
If you don't have access to the Dockerfile, you can try to create one using the output of docker history --no-trunc
<image_id>` you may run into a couple of issues:
- You may be missing the supporting resources
- Layers can be manual modified in which case the output of
docker history
would not tell you the full story