Dock-- mirror principle

Mirroring

Mirroring is a lightweight, standalone executable software package used to package software operating environment and software-based operating environment developed, it contains everything you need to run a piece of software, including code, runtime libraries, environment variables and configuration files.

Joint File System (UnionFS)

Union File System (UnionFS) is a layered, lightweight and high-performance file system that supports to modify the file system as a superposition of layers of time to submit , at the same time in different directories can be mounted to the same virtual the file system (unite several directories into a single virtual filesystem). Union file system is the basis Docker image. Mirroring can be inherited by layering, on the basis of image (no parent image), can create a variety of specific applications image.
Here Insert Picture Description
Features: once while loading multiple file systems, but from the outside it seems, can only see a file system, the file system layers of joint load will stack up, so that the final document will contain all the underlying files and directories.

Load mirroring principle Docker

docker mirror file is actually composed of layers of system components, such a hierarchical file system UnionFS.

bootfs (boot file system) consists mainly bootloader and kernel, bootloader mainly boot loader kernel, loads bootfs file system Linux has just started, the lowest level in Docker image is bootfs. This is one of our typical Linux / Unix systems is the same, which contains the boot loader and the kernel. When the boot to complete the kernel is loaded in memory, and this time the right to use the memory bootfs has been transferred to the kernel, then the system will unload bootfs.

rootfs (root file system), on bootfs. Included is a typical Linux system, / dev, / proc, / bin, / etc and other standard directories and files. rootfs is a variety of different operating system releases, such as Ubuntu, Centos and so on.
Here Insert Picture Description
Here Insert Picture Description

Layered mirror

To pull our example, the download process we can see the docker's image seems to be in one layer in the download.
Here Insert Picture Description

Why Docker With this layered mirrored?

The biggest advantage is - shared resources

For example: There are built from multiple mirrors from the same base image, then the host simply save a base image on disk,

While memory is also just load a base image, you can assume that all the container services. And each layer of the mirror can be shared.

Docker mirroring features

Docker image are read-only, when the container starts, a new writable layer is loaded on top of the mirror, this layer is generally referred to as "the container layer", called "image layer" below "the container layer" .

Published 584 original articles · won praise 1815 · Views 220,000 +

Guess you like

Origin blog.csdn.net/cold___play/article/details/103963708
Recommended