[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN118170500A - Method and system for constructing container mirror image and dynamically injecting container mirror image - Google Patents

Method and system for constructing container mirror image and dynamically injecting container mirror image Download PDF

Info

Publication number
CN118170500A
CN118170500A CN202410585945.8A CN202410585945A CN118170500A CN 118170500 A CN118170500 A CN 118170500A CN 202410585945 A CN202410585945 A CN 202410585945A CN 118170500 A CN118170500 A CN 118170500A
Authority
CN
China
Prior art keywords
image
file
container
index
runtime
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202410585945.8A
Other languages
Chinese (zh)
Inventor
李华莹
刘必欣
杨超
刘丽
薛源
张捷
周恭谦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Research Institute of War of PLA Academy of Military Science
Original Assignee
Research Institute of War of PLA Academy of Military Science
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Research Institute of War of PLA Academy of Military Science filed Critical Research Institute of War of PLA Academy of Military Science
Priority to CN202410585945.8A priority Critical patent/CN118170500A/en
Publication of CN118170500A publication Critical patent/CN118170500A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to a method and a system for constructing a container mirror image and dynamically injecting the container mirror image, which belong to the technical field of cloud computing and comprise the following steps: decoupling the traditional standard image into a basic support image, a runtime image and an application program image; constructing a file signature index based on an index threshold value, and uploading the file signature index to a cloud file storage system; dynamically loading and injecting files from the base support image, the runtime image, or the application image into the corresponding layers of the container by the file entity injection form or the file index pull form, respectively. The method and the system provided by the application are beneficial to efficient storage and quick distribution of the mirror images; the method can be quickly completed when a new mirror image is constructed, so that the deployment speed is increased; additional components, configuration information or files can be dynamically injected into the container when the container runs according to actual requirements, so that the flexibility and adaptability of the container application are improved; file-level sharing between the base support image, the runtime image, and the application image may be achieved.

Description

Method and system for constructing container mirror image and dynamically injecting container mirror image
Technical Field
The invention relates to the technical field of cloud computing, in particular to a method and a system for constructing a container mirror image and dynamically injecting the container mirror image.
Background
The container mirror image is a lightweight and independent software packaging form, the application program and all the dependent items thereof are packaged together to ensure that the application program has a consistent running mode in different environments, the container mirror image is based on a united file system (Union FILE SYSTEM) technology, the united file system allows a plurality of file systems to be mounted under the same directory to form a unified file system view, in the container mirror image, different layers can be integrated together through the united file system technology to provide a unified file system for the container, and the mechanism enables the container to share the same basic file system and realizes the layered storage structure of the container mirror image.
The container mirror image technology realizes efficient application program packaging and distribution modes by means of the bottom technologies such as a combined file system, copy-on-write and the like, revolutionary transformation is brought to software development and deployment, and the application program can be deployed in a cross-platform mode, iterated quickly and delivered continuously more easily due to the container mirror image, so that the productivity and efficiency of development teams are greatly improved.
With popularization and application of the containerization technology, the container integrally loads operating system and other operating environment data in a software mirror package, the container mirror contains all operating environments required by services while providing a quick and convenient 'out-of-box' characteristic, so that the mirror scale is continuously increased, and when the general container mirror construction technology is applied to the field of corresponding information systems, various problems are caused due to the large volume of the container mirror, such as challenges of increased mirror construction time consumption, increased storage space requirement, prolonged mirror transmission or distribution time and the like; particularly, the effective program content of the container mirror image can only occupy a small part of the whole mirror image, and the effective content occupies too low a ratio, so that the resource waste and the performance reduction are caused; meanwhile, the information system is suitable for changeable tasks and application scenes and faces software requirement change and quick iteration requirements, so that the software needs to be packaged and mirrored in an integrated mode every time, a great amount of time is spent for constructing the container mirror, and update timeliness and update efficiency are low.
Disclosure of Invention
The invention aims to provide a method and a system for constructing a container mirror image and dynamically injecting the container mirror image, so as to solve the defects in the prior art.
The invention provides a method for constructing a container mirror image and dynamically injecting the container mirror image, which comprises the following steps:
decoupling the traditional standard image into a basic support image, a runtime image and an application program image;
constructing file signature indexes respectively corresponding to a basic support image, a runtime image and an application program image based on an index threshold, and uploading file entities corresponding to the file signature indexes to a cloud file storage system;
dynamically loading and injecting files from the base support image, the runtime image, or the application image into the corresponding layers of the container by the file entity injection form or the file index pull form, respectively.
In the above scheme, constructing the file signature indexes respectively corresponding to the base support image, the runtime image and the application image based on the index threshold includes:
And establishing corresponding file signature indexes for files with the sizes larger than an index threshold value in the basic support image, the runtime image and the application program image.
In the above scheme, the calculation formula of the index threshold is:
wherein S is an index threshold value, X i epsilon X, X is a file size list obtained by scanning a file storage system on the cloud and recording the size of each file, Representing the average of all file sizes,/>Representing a threshold determined according to disk space constraints, D max is the maximum available amount of disk space, α is an adjustment factor to ensure that indexed large files do not occupy too much disk space,/>, andRepresenting a threshold determined according to the time complexity of establishing the index and the system performance requirement, T max is the maximum index establishment time allowed by the file storage system on the cloud, and O (f) is the time complexity of establishing the index on the unit file by the Blake2b algorithm.
In the above-mentioned scheme, when the file is dynamically loaded and injected into the corresponding layer of the container from the base support image, the runtime image or the application image respectively in the corresponding layer of the container through the file entity injection form, the base support image, the runtime image or the application image is triggered according to the decoupling division rule of the traditional standard image when the container is started or during the running process, and the corresponding file is directly loaded and injected into the corresponding layer of the container from the base support image, the runtime image or the application image through the injection mechanism of file copying.
In the above scheme, when the file is dynamically loaded and injected into the corresponding layer of the container from the base support image, the runtime image or the application program image respectively in the form of file index pulling, the file entity corresponding to the file signature index is pulled from the cloud file storage system and shared into the corresponding layer of the container, or the file is shared into the corresponding layer of the container in the file mounting mode.
In the above scheme, when the file signature index exists in the local file sharing pool, the file is shared into the corresponding layer of the container in a file mounting mode.
In the above scheme, when the file signature index does not exist in the local file sharing pool, the local file sharing pool pulls the corresponding file entity from the cloud file storage system according to the file signature index, and shares the file to the corresponding layer of the container in a file mounting mode.
In the above scheme, the base support image, the runtime image and the application image after constructing the file signature index all include the file entity and the file signature index.
In the above scheme, the base support mirror image, the runtime mirror image and the application mirror image all adopt a single-layer or multi-layer structure.
The invention provides a system for constructing and dynamically injecting a container mirror image, which adopts the method for constructing and dynamically injecting the container mirror image to construct and dynamically inject the container mirror image, and comprises the following steps:
the decoupling dividing module is used for decoupling and dividing the traditional standard mirror image into a basic support mirror image, a runtime mirror image and an application program mirror image;
The file signature index construction module is used for constructing file signature indexes respectively corresponding to the basic support image, the runtime image and the application program image based on the index threshold value, and uploading file entities corresponding to the file signature indexes to the cloud file storage system;
And the loading injection module is used for dynamically loading and injecting the files into the corresponding layers of the container from the basic support image, the runtime image or the application program image respectively through the file entity injection form or the file index pulling form.
The embodiment of the invention has the following advantages:
According to the method and the system for constructing the container mirror image and dynamically injecting the container mirror image, the traditional standard mirror image is decoupled and divided into the basic support mirror image, the runtime mirror image and the application program mirror image, different components or functions are divided according to independent logic units, the packed mirror image is relatively small in volume, and efficient storage and quick distribution of the mirror image are facilitated; the traditional standard mirror image decoupling is divided into the basic support mirror image, the runtime mirror image and the application program mirror image, the basic support mirror image, the runtime mirror image and the application program mirror image can be independently and quickly constructed and deployed, and the mirror image layered packaging is realized, and because the mirror image layered packaging can reuse the existing mirror image layers, the mirror image can be quickly completed when a new mirror image is constructed, the deployment speed is increased, wherein when a certain component needs to be updated, the mirror image of the certain component does not need to be totally repacked, and the running maintenance is more flexible; additional components, configuration information or files can be dynamically injected into the container according to actual requirements when the container runs, so that the flexibility and adaptability of the application of the container are improved, and in the container running, a certain component is updated or a certain function is expanded without restarting the container image, and only part of the component image is updated; the file level sharing among the basic support mirror image, the runtime mirror image and the application program mirror image can be realized, the data volume of distribution and transmission is obviously reduced, and the efficiency and the performance of the whole system can be obviously improved; through file-level sharing, the same file can be directly shared in different container deployment processes, repeated downloading and storage of the same data are avoided, and occupation of network bandwidth and waste of storage resources are reduced; meanwhile, file-level sharing among the basic support mirror image, the runtime mirror image and the application program mirror image is also beneficial to unified management and updating of shared files, consistency and integrity of the files are ensured, version and authority of the files can be more effectively managed and controlled by maintaining a centralized file sharing pool, and system maintenance and upgrading flows are simplified; in addition, file-level sharing also provides more flexible deployment options for container deployment, so that container applications can be started and expanded more quickly, and the response speed and scalability of the system are further improved.
Drawings
FIG. 1 is a flow diagram of a method for container image construction and dynamic injection in accordance with an embodiment of the present invention;
FIG. 2 is a flow diagram of splitting a traditional standard image according to an embodiment of the present invention;
FIG. 3 is a flow diagram of splitting a complete image of service directory software according to an embodiment of the present invention;
FIG. 4 is a flow diagram of constructing file signature indexes corresponding to respective images according to an embodiment of the present invention;
FIG. 5 is a flow chart of dynamically loading and injecting files in a file index pull format according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of the system for container mirror construction and dynamic injection according to an embodiment of the present invention.
Detailed Description
It should be noted that, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other. The application will be described in detail below with reference to the drawings in connection with embodiments.
As shown in fig. 1, the present invention provides a method for constructing and dynamically injecting a container mirror image, which comprises the following steps:
step S1: decoupling the traditional standard image into a basic support image, a runtime image and an application program image;
Specifically, in the process of splitting the traditional standard image, the traditional standard image is decoupled and divided into a basic support image, a runtime image and an application program image according to the software structure and the running characteristics, and specifically, reference can be made to fig. 1; the base support mirror image refers to a root file system roofs on which a software running bottom layer depends, the runtime mirror image refers to a base runtime environment required by program execution, such as a Java environment, a Python environment and the like, and the application program mirror image refers to an executable program package developed for an end user, such as a program package of software of joint planning, comprehensive situation, action monitoring and the like; for example, the service directory software is developed by Java language, and the complete image decoupling of the service directory software can be divided into a Kylin operating system image, a Java running environment image and a service directory Jar packet image according to the above-mentioned splitting rule, and specifically, refer to fig. 3;
Specifically: the traditional standard mirror image decoupling is divided into a basic support mirror image, a runtime mirror image and an application program mirror image, when the service requirement of the system is updated, only the application program mirror image is needed to be reconstructed under normal conditions, and the mirror image construction time can be effectively shortened; meanwhile, the traditional standard mirror image is decoupled and divided into a basic support mirror image, a runtime mirror image and an application program mirror image, different components or functions are divided according to independent logic units, and the packed mirror image has relatively small volume, so that the mirror image is favorable for efficient storage and quick distribution; in addition, the traditional standard mirror image decoupling is divided into a basic support mirror image, a runtime mirror image and an application program mirror image, the basic support mirror image, the runtime mirror image and the application program mirror image can be independently and quickly constructed and deployed, and the mirror image layered packaging is realized, and because the mirror image layered packaging can reuse the existing mirror image layers, the mirror image can be quickly completed when a new mirror image is constructed, the deployment speed is increased, wherein when a certain component needs to be updated, the mirror image of the certain component does not need to be completely repacked, and the running maintenance is more flexible;
Step S2: constructing file signature indexes respectively corresponding to a basic support image, a runtime image and an application program image based on an index threshold, and uploading file entities corresponding to the file signature indexes to a cloud file storage system;
Specifically, the file signature index is a digital signature which is generated by carrying out hash operation according to file content in a basic support image, a runtime image or an application program image through a Blake2b algorithm and can uniquely identify a corresponding file;
Specifically, whether the file exists in the basic support image, the runtime image or the application program image in the form of a file entity or an index is determined by an index threshold S, and the more files needed to establish the signature index are needed to form the file signature index, the longer the calculation time is, the index threshold S is set for balancing the size of the image and the time needed to establish the file signature index, and when the size of the file is larger than the index threshold S, the file signature index is established, otherwise, the file signature index is not established, so that the basic support image, the runtime image and the application program image are formed by mixing the file index and the file, and the image volume is greatly compressed; in addition, aiming at the basic support mirror image, the runtime mirror image and the application program mirror image, a corresponding cloud file storage system is matched, and a file entity corresponding to the file signature index is uploaded to the cloud file storage system for subsequent dynamic on-demand downloading;
Specifically, the index threshold S is designed by comprehensively considering file size distribution, system resource limitation, time complexity and performance requirement of establishing an index, so as to ensure that the system can quickly establish the index and maintain high-efficiency performance, and the calculation formula of the index threshold S is as follows:
;
Wherein X i epsilon X, X is a file size list obtained by scanning a file storage system on the cloud and recording the size of each file, Representing the average of all file sizes,/>Representing a threshold determined according to disk space constraints, D max is the maximum available amount of disk space, α is an adjustment factor to ensure that indexed large files do not occupy too much disk space,/>, andRepresenting a threshold value determined according to the time complexity of establishing the index and the system performance requirement, wherein T max is the maximum index establishment time allowed by the file storage system on the cloud, and O (f) is the time complexity of establishing the index on the unit file by the Blake2b algorithm;
specifically, after the file signature indexes respectively corresponding to the basic support mirror image, the runtime mirror image and the application program mirror image are built based on the index threshold value, the basic support mirror image, the runtime mirror image and the application program mirror image all comprise file entities and file signature indexes, so that the volume of the mirror image is compressed, and when the volume of the mirror image is reduced, the efficiency of transmission and storage is improved, for example, the same bandwidth is increased, the smaller the volume is, the less the consumed transmission time is, the less the bandwidth is occupied, and the same storage space can be used for storing more mirror images;
specifically, the file entity corresponding to the file signature index is uploaded to the cloud file storage system, so that the problem of file entity acquisition can be solved, cloud storage is realized, and whole network sharing is realized;
specifically, the basic support mirror image, the runtime mirror image and the application program mirror image all adopt a single-layer or multi-layer structure;
in one embodiment of the present invention, the base support image, the runtime image, and the application image adopt a two-layer structure, and the first layer and the second layer of the base support image, the runtime image, and the application image each include a plurality of file entities and a plurality of file signature indexes, and upload the file entities corresponding to the file signature indexes to the cloud file storage system, and when the file entities corresponding to the file signature indexes need to be acquired subsequently, pull the corresponding file entities from the cloud file storage system according to the file signature indexes, see fig. 4 specifically;
Step S3: dynamically loading and injecting files into corresponding layers of the container from the base support image, the runtime image or the application program image respectively through a file entity injection form or a file index pull form;
Specifically, when a file is dynamically loaded and injected into a corresponding layer of a container from a basic support image, a runtime image or an application program image respectively in a corresponding layer of the container through a file entity injection form, triggering the basic support image, the runtime image or the application program image according to a decoupling division rule of a traditional standard image when the container is started or in the running process, and directly loading and injecting the corresponding file into the corresponding layer of the container from the basic support image, the runtime image or the application program image through an injection mechanism of file copying;
specifically, when files are dynamically loaded and injected into the corresponding layers of the container from the base support image, the runtime image or the application program image respectively in the form of file index pulling, file entities corresponding to the file signature indexes are pulled from the cloud file storage system and shared into the corresponding layers of the container or files are shared into the corresponding layers of the container in the mode of file mounting, and specifically, refer to fig. 5;
Specifically, when a file entity exists in a local file sharing pool in the file signature index, sharing a file to a corresponding layer of a container in a file mounting mode; when the file signature index does not exist in the local file sharing pool, the local file sharing pool pulls the corresponding file entity from the cloud file storage system according to the file signature index and shares the file to the corresponding layer of the container in a file mounting mode, so that when the same file signature index exists in the same physical node container deployment process, the file can be shared through the local file sharing pool, repeated pulling of the same file can be effectively prevented, the downloading amount of data is further reduced, and the resource utilization rate is improved;
specifically, files are dynamically loaded and injected into corresponding layers of a container from a basic support mirror image, a runtime mirror image or an application program mirror image respectively through a file index pulling form, so that file-level sharing among the basic support mirror image, the runtime mirror image and the application program mirror image can be realized, the data volume of distribution and transmission is obviously reduced, and the efficiency and performance of the whole system can be obviously improved; through file-level sharing, the same file can be directly shared in different container deployment processes, repeated downloading and storage of the same data are avoided, and occupation of network bandwidth and waste of storage resources are reduced; meanwhile, file-level sharing among the basic support mirror image, the runtime mirror image and the application program mirror image is also beneficial to unified management and updating of shared files, consistency and integrity of the files are ensured, version and authority of the files can be more effectively managed and controlled by maintaining a centralized file sharing pool, and system maintenance and upgrading flows are simplified; in addition, file-level sharing also provides more flexible deployment options for container deployment, so that container application programs can be started and expanded more quickly, and the response speed and scalability of the system are further improved;
Specifically, in step S3, additional components, configuration information or files may be dynamically injected into the container according to actual requirements during the running of the container, so as to improve flexibility and adaptability of application of the container, and in the running of the container, updating a component or expanding a function does not need to re-upload and restart the container image, only part of the component images need to be updated.
As shown in fig. 6, the present invention provides a system for constructing and dynamically injecting a container mirror image, which adopts the method for constructing and dynamically injecting a container mirror image as described above, the system comprising:
the decoupling dividing module is used for decoupling and dividing the traditional standard mirror image into a basic support mirror image, a runtime mirror image and an application program mirror image;
The file signature index construction module is used for constructing file signature indexes respectively corresponding to the basic support image, the runtime image and the application program image based on the index threshold value, and uploading file entities corresponding to the file signature indexes to the cloud file storage system;
And the loading injection module is used for dynamically loading and injecting the files into the corresponding layers of the container from the basic support image, the runtime image or the application program image respectively through the file entity injection form or the file index pulling form.
It should be noted that the foregoing detailed description is exemplary and is intended to provide further explanation of the application. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of exemplary embodiments according to the present application. As used herein, the singular is intended to include the plural unless the context clearly indicates otherwise. Furthermore, it will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, steps, operations, devices, components, and/or groups thereof.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or otherwise described herein.
Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those elements but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Spatially relative terms, such as "above … …," "above … …," "upper surface on … …," "above," and the like, may be used herein for ease of description to describe one device or feature's spatial location relative to another device or feature as illustrated in the figures. It will be understood that the spatially relative terms are intended to encompass different orientations in use or operation in addition to the orientation depicted in the figures. For example, if the device in the figures is turned over, elements described as "above" or "over" other devices or structures would then be oriented "below" or "beneath" the other devices or structures. Thus, the exemplary term "above … …" may include both orientations "above … …" and "below … …". The device may also be positioned in other different ways, such as rotated 90 degrees or at other orientations, and the spatially relative descriptors used herein interpreted accordingly.
In the above detailed description, reference is made to the accompanying drawings, which form a part hereof. In the drawings, like numerals typically identify like components unless context indicates otherwise. The illustrated embodiments described in the detailed description, drawings, and claims are not meant to be limiting. Other embodiments may be utilized, and other changes may be made, without departing from the spirit or scope of the subject matter presented herein.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method of container image construction and dynamic injection, the method comprising:
decoupling the traditional standard image into a basic support image, a runtime image and an application program image;
constructing file signature indexes respectively corresponding to a basic support image, a runtime image and an application program image based on an index threshold, and uploading file entities corresponding to the file signature indexes to a cloud file storage system;
dynamically loading and injecting files from the base support image, the runtime image, or the application image into the corresponding layers of the container by the file entity injection form or the file index pull form, respectively.
2. The method of claim 1, wherein constructing file signature indexes for each of the base support image, the runtime image, and the application image based on the index threshold comprises:
And establishing corresponding file signature indexes for files with the sizes larger than an index threshold value in the basic support image, the runtime image and the application program image.
3. The method of claim 1, wherein the method comprises the steps of,
The calculation formula of the index threshold value is as follows:
;
wherein S is an index threshold value, X i epsilon X, X is a file size list obtained by scanning a file storage system on the cloud and recording the size of each file, Representing the average of all file sizes,/>Representing a threshold determined according to disk space constraints, D max is the maximum available amount of disk space, α is an adjustment factor to ensure that indexed large files do not occupy too much disk space,/>, andRepresenting a threshold determined according to the time complexity of establishing the index and the system performance requirement, T max is the maximum index establishment time allowed by the file storage system on the cloud, and O (f) is the time complexity of establishing the index on the unit file by the Blake2b algorithm.
4. The method for constructing and dynamically injecting container images according to claim 1, wherein when a file is dynamically loaded and injected into a corresponding layer of a container from a base support image, a runtime image or an application image in a corresponding layer of the container through a file entity injection form, the base support image, the runtime image or the application image is triggered according to a decoupling division rule of a conventional standard image at the time of starting or during operation of the container, and the corresponding file is directly loaded and injected into the corresponding layer of the container from the base support image, the runtime image or the application image through an injection mechanism of file copy.
5. The method according to claim 1, wherein when dynamically loading and injecting files into the corresponding layers of the container from the base support image, the runtime image, or the application image, respectively, in the form of file index pull, file entities corresponding to the file signature indexes are pulled from the cloud file storage system and shared into the corresponding layers of the container or files are shared into the corresponding layers of the container by file mount.
6. The method of claim 5, wherein the file is shared to the corresponding layer of the container by file mount when the file signature index exists in the local file sharing pool.
7. The method of claim 5, wherein when the file signature index does not exist in the local file sharing pool, the corresponding file entity is pulled from the cloud file storage system according to the file signature index in the local file sharing pool, and the file is shared into the corresponding layer of the container by file mounting.
8. The method of claim 1, wherein the base support image, the runtime image, and the application image after constructing the file signature index each comprise a file entity and a file signature index.
9. The method of claim 1, wherein the base support image, the runtime image, and the application image each have a single-layer or multi-layer structure.
10. A system for constructing and dynamically injecting a container image, which adopts the method for constructing and dynamically injecting a container image according to any one of claims 1 to 9, and is characterized in that the system comprises:
the decoupling dividing module is used for decoupling and dividing the traditional standard mirror image into a basic support mirror image, a runtime mirror image and an application program mirror image;
The file signature index construction module is used for constructing file signature indexes respectively corresponding to the basic support image, the runtime image and the application program image based on the index threshold value, and uploading file entities corresponding to the file signature indexes to the cloud file storage system;
And the loading injection module is used for dynamically loading and injecting the files into the corresponding layers of the container from the basic support image, the runtime image or the application program image respectively through the file entity injection form or the file index pulling form.
CN202410585945.8A 2024-05-13 2024-05-13 Method and system for constructing container mirror image and dynamically injecting container mirror image Pending CN118170500A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410585945.8A CN118170500A (en) 2024-05-13 2024-05-13 Method and system for constructing container mirror image and dynamically injecting container mirror image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410585945.8A CN118170500A (en) 2024-05-13 2024-05-13 Method and system for constructing container mirror image and dynamically injecting container mirror image

Publications (1)

Publication Number Publication Date
CN118170500A true CN118170500A (en) 2024-06-11

Family

ID=91350868

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410585945.8A Pending CN118170500A (en) 2024-05-13 2024-05-13 Method and system for constructing container mirror image and dynamically injecting container mirror image

Country Status (1)

Country Link
CN (1) CN118170500A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100287338A1 (en) * 2009-05-06 2010-11-11 An Yonghyun Selective mirroring method
CN112685134A (en) * 2020-12-31 2021-04-20 中科星图股份有限公司 Mirror image construction and loading method based on mirror image loading in container environment
CN114924845A (en) * 2022-07-21 2022-08-19 合肥中科类脑智能技术有限公司 Mirror image delay loading method and system suitable for edge AI scene

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100287338A1 (en) * 2009-05-06 2010-11-11 An Yonghyun Selective mirroring method
CN112685134A (en) * 2020-12-31 2021-04-20 中科星图股份有限公司 Mirror image construction and loading method based on mirror image loading in container environment
CN114924845A (en) * 2022-07-21 2022-08-19 合肥中科类脑智能技术有限公司 Mirror image delay loading method and system suitable for edge AI scene

Similar Documents

Publication Publication Date Title
CN107515776B (en) Method for upgrading service continuously, node to be upgraded and readable storage medium
CN110442430B (en) Publishing method based on distributed storage container cloud application
CN111324360A (en) Container mirror image construction method facing edge calculation
CN111857873A (en) Method for realizing cloud native container network
CN108667904B (en) Docker container remote memory volume management method and system
CN113296792B (en) Storage method, device, equipment, storage medium and system
CN104158886B (en) Flow-type performing method for applications
CN107729020A (en) A kind of method for realizing extensive container rapid deployment
CN114995841B (en) Method and system for realizing database cloud service upgrade
KR20080106412A (en) A data storage management method and device
CN112463290A (en) Method, system, apparatus and storage medium for dynamically adjusting the number of computing containers
KR20140100504A (en) Data transmission and reception system
CN103237037A (en) Media format conversion method and system based on cloud computing architecture
CN114860344B (en) Container starting method, device, computer equipment and storage medium
CN102486734A (en) Rich client application system
CN115827008B (en) Cloud primary big data component management system based on cloud primary platform Kubernetes
CN115499310A (en) Business application cloud method and system based on cloud computing platform container service
CN113918281A (en) Method for improving cloud resource expansion efficiency of container
CN101183975B (en) Distributed heat dispositions method of cluster application server
CN114270315A (en) Hydration of applications
Fan et al. Gear: Enable efficient container storage and deployment with a new image format
CN112506615B (en) Java Web application deployment method, device, equipment and storage medium
CN113420005A (en) Data storage method, system, electronic device and computer storage medium
CN116192872A (en) Method, system, electronic device and storage medium for accelerating supply of edge environment container
CN118170500A (en) Method and system for constructing container mirror image and dynamically injecting container mirror image

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination