Mirror warehouse introduction

The main functions of the mirror warehouse are mirror storage, mirror management and mirror distribution. Each warehouse can contain multiple images, which are distinguished by tags. Usually, when using mirroring, three elements should be fully considered: mirror warehouse type, warehouse application, and specific application version.

Through the mirror warehouse, images can be easily shared among multiple operating environments, and the same operating environment can be quickly simulated to run applications through containers, so as to avoid abnormal operation or inconsistent behavior of applications due to different operating environments.

The image contains the main body of the application, as well as the operating environment and tool sets required by the application. When building a mirror, you can specify the mirror warehouse, warehouse, and tags of the mirror, or add the mirror warehouse, warehouse, and tags to the mirror after the build is complete, so as to push the same mirror to different mirror warehouses. The mirror warehouse is at the center of mirror sharing, and is closely related to the mirror warehouse in mirror construction, continuous integration, mirror deployment, and mirror release, as shown in Figure 1.

Figure 1 Mirror warehouse

 The object directly managed by the mirror warehouse is not a specific mirror, but a warehouse. The warehouse manages images through tags, as shown in Figure 2.

Figure 2 Mirror management

 The image is composed of metadata and block files. Metadata management is the core function of the image warehouse. Metadata is the core information of an image, including information such as the image warehouse, warehouse, label, verification code, file layer, and image construction description of the image. A block file is an entity that forms a joint file layer of a mirror, and each block file is a file layer, which contains the changes of the corresponding file layer.

Figure 3 Mirror block file dependencies

 The mirror warehouse manages each block file through the check code of the file layer. When multiple images are built based on the same base image, these images have the same basic block files, and these images share this part of block files in the mirror repository. Therefore, when deleting a mirror, you cannot directly delete all the mirror block files referenced by the mirror, but a special garbage collector will clean up the block files that are not referenced.

Guess you like

Origin blog.csdn.net/m0_60258751/article/details/128333690