my_image:1.0), but this was usually reserved for the leaf image. Optionally, each image could also be tagged with a meaningful name (e.g. In this way, Docker was able to construct a filesystem for a container, with each image in turn referencing its parent and the corresponding layer content, until the base image was reached which had no parent.
Internally, the image consisted of a configuration object, which held the characteristics of the image, including its ID, and the ID of the image's parent image. Docker stored the layer contents in a directory with a name synonymous with the image ID. Historically (pre Docker v1.10), each time a new layer was created as a result of a commit action, Docker also created a corresponding image, which was identified by a randomly generated 256-bit UUID, usually referred to as an image ID (presented in the UI as either a short 12-digit hex string, or a long 64-digit hex string). The output of the docker history command above shows that the debian image has two layers.
These new or modified files and directories are 'committed' as a new layer. During its lifetime, if a container needs to change a file from the read-only image that provides its filesystem, it copies the file up to its own private read-write layer before making the change.Ī layer or 'diff' is created during the Docker image build process, and results when commands are run in a container, which produce new or modified files and directories. Sharing of image layers is a fundamental component of the Docker platform, and is possible through the implementation of a copy-on-write (COW) mechanism. A docker image is a read-only template for creating containers, and provides a filesystem based on an ordered union of multiple layers of files and directories, which can be shared with other images and containers. So, what was the change, and why does the docker history command show some IDs as ? $ docker history debianġ742affe03b5 10 days ago /bin/sh -c #(nop) CMD 0 B Whilst this was publicised well, and there was little impact on the general usage of Docker (image migration, aside), there were some UI changes which sparked some confusion.
When Docker v1.10 came along, there was a fairly seismic change with the way the Docker Engine handles images.