CN113407308A - Container mirror image obtaining method and device - Google Patents

Container mirror image obtaining method and device Download PDF

Info

Publication number
CN113407308A
CN113407308A CN202110704844.4A CN202110704844A CN113407308A CN 113407308 A CN113407308 A CN 113407308A CN 202110704844 A CN202110704844 A CN 202110704844A CN 113407308 A CN113407308 A CN 113407308A
Authority
CN
China
Prior art keywords
container
mirror image
client
scene
image file
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
CN202110704844.4A
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.)
Longxin Zhongke Hefei Technology Co ltd
Original Assignee
Longxin Zhongke Hefei Technology Co ltd
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 Longxin Zhongke Hefei Technology Co ltd filed Critical Longxin Zhongke Hefei Technology Co ltd
Priority to CN202110704844.4A priority Critical patent/CN113407308A/en
Publication of CN113407308A publication Critical patent/CN113407308A/en
Pending legal-status Critical Current

Links

Images

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
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/148File search processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • 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
    • G06F2009/45562Creating, deleting, cloning virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Library & Information Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention provides a container mirror image obtaining method and device. The method comprises the following steps: the container server side receives a mirror image obtaining instruction sent by the container client side, wherein the mirror image obtaining instruction carries a first scene label, and the first scene label is used for representing information of the container client side; if at least one mirror image information item containing a second scene label exists in the target mirror image list, the container server side obtains the target mirror image information item from the target mirror image list, the second scene label of the target mirror image information item is matched with the first scene label, and the first scene label and the second scene label are user-defined labels; and the container server sends the container mirror image file of the target mirror image information item to the container client. The invention can allow the user to add the self-defined scene label to the image file so as to represent various scenes suitable for the image file, and is beneficial to reducing and improving the complexity of obtaining the image file.

Description

Container mirror image obtaining method and device
Technical Field
The invention relates to the technical field of computers, in particular to a container mirror image obtaining method and device.
Background
The containerization technology is a common technology of the existing service terminals, and each service terminal can be used as a container. Among them, a commonly used containerization technology is a docker container, a mirror image of the docker container is an LXC (linux container) based advanced container engine, and a source code is hosted in a gitubb (git-based code hosting center). The user can acquire the container image file from the container server to develop the container realizing the personalization based on the container image file.
In the prior art, a container image file acquired from a container server is related to a processor of a pulled container client. For example, if the processor of the container client is X86, the acquired container image file is a container image file suitable for an X86 processor, and if the processor of the container client is ARM, the acquired container image file is a container image file suitable for an ARM processor.
However, the above scheme has a high complexity of acquiring the container image file.
Disclosure of Invention
The invention provides a container mirror image acquisition method and device, which are used for solving the problem of higher complexity of acquiring a container mirror image file.
In a first aspect, the present invention provides a container mirror image obtaining method, applied to a container server, including:
receiving a mirror image acquisition instruction sent by a container client, wherein the mirror image acquisition instruction carries a first scene label which is used for representing information of the container client;
if at least one mirror image information item containing a second scene tag exists in a target mirror image list, acquiring the target mirror image information item from the target mirror image list, wherein the second scene tag of the target mirror image information item is matched with the first scene tag, and the first scene tag and the second scene tag are user-defined tags;
and sending the container image file corresponding to the target image information item to the container client.
In a second aspect, the present invention provides a container mirror image obtaining method, applied to a container client, including:
sending a mirror image acquisition instruction to a container server, wherein the mirror image acquisition instruction carries a first scene tag, the first scene tag is a user-defined tag, and the first scene tag is used for representing information of the container client;
and receiving the container image file corresponding to the first scene label sent by the container server.
In a third aspect, an embodiment of the present invention further provides a container server, including:
the system comprises a mirror image acquisition instruction receiving module, a mirror image acquisition module and a mirror image acquisition module, wherein the mirror image acquisition instruction receiving module is used for receiving a mirror image acquisition instruction sent by a container client, the mirror image acquisition instruction carries a first scene label, and the first scene label is used for representing information of the container client;
a target mirror image information item obtaining module, configured to obtain a target mirror image information item from a target mirror image list if at least one mirror image information item including a second scene tag exists in the target mirror image list, where the second scene tag of the target mirror image information item is matched with the first scene tag, and the first scene tag and the second scene tag are user-defined tags;
and the mirror image file sending module is used for sending the container mirror image file corresponding to the target mirror image information item to the container client.
In a fourth aspect, an embodiment of the present invention further provides a container client, including:
the system comprises a mirror image instruction sending module, a container client and a mirror image acquiring module, wherein the mirror image acquiring module is used for sending a mirror image acquiring instruction to the container server, the mirror image acquiring instruction carries a first scene label, the first scene label is a label defined by a user, and the first scene label is used for representing information of the container client;
and the image file receiving module is used for receiving the container image file corresponding to the first scene label sent by the container server.
In a fifth aspect, an embodiment of the present invention further provides a container server, including: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executes computer-executable instructions stored by the memory to cause the container server to implement the method of the first aspect.
In a sixth aspect, an embodiment of the present invention further provides a container client, including: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executes the memory-stored computer-executable instructions to cause the container client to implement the method of the second aspect.
In a seventh aspect, an embodiment of the present invention further provides a container mirroring service system, including: a container server of the third aspect or the fifth aspect and a container client of the fourth aspect or the sixth aspect.
In an eighth aspect, the embodiments of the present invention further provide a non-transitory computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a container server, the method in the first aspect is implemented, and when the computer-executable instructions are executed by a container client, the method in the second aspect is implemented.
In a ninth aspect, an embodiment of the present invention further provides a computer program, where the computer program is configured to implement the method in the first aspect or the second aspect.
The invention provides a container mirror image obtaining method and equipment, wherein the method comprises the following steps: the container server side receives a mirror image obtaining instruction sent by the container client side, wherein the mirror image obtaining instruction carries a first scene label, and the first scene label is used for representing information of the container client side; if at least one mirror image information item containing a second scene label exists in the target mirror image list, the container server side obtains the target mirror image information item from the target mirror image list, the second scene label of the target mirror image information item is matched with the first scene label, and the first scene label and the second scene label are user-defined labels; and the container server sends the container image file corresponding to the target image information item to the container client. The invention can allow a user to add the self-defined scene label to the container image file so as to represent various applicable scenes of the container image file. For example, processor information, operating system type, operating system kernel, operating system version, etc. to which the container image file applies may be represented by a scenario tag. Therefore, when the container image file is acquired, the scene applicable to the container image file can be acquired only by matching one scene label, and four fields for representing processor information, operating system type, operating system kernel, operating system version and the like do not need to be matched respectively, so that the fields required to be input by a user and the matched fields can be effectively reduced when the container image file is acquired, and the complexity of acquiring the container image file is reduced.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is a schematic structural diagram of a container mirroring service system according to an embodiment of the present invention;
fig. 2 and 3 are flowcharts illustrating steps of two container image obtaining methods according to embodiments of the present invention;
fig. 4 is a schematic diagram of an interaction process between a container server and a container client according to an embodiment of the present invention;
fig. 5 is a block diagram of a container server according to an embodiment of the present invention;
fig. 6 is a block diagram of a container client according to an embodiment of the present invention;
fig. 7 is a block diagram of an electronic device according to an embodiment of the present invention.
With the above figures, certain embodiments of the invention have been illustrated and described in more detail below. The drawings and the description are not intended to limit the scope of the inventive concept in any way, but rather to illustrate it by those skilled in the art with reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present invention will be described below with reference to the accompanying drawings.
The container mirror image obtaining method provided by the embodiment of the invention can be applied to a container mirror image service system, and the container mirror image service system generally comprises a container client and a container server. The container server is used for storing container mirror image files, and the container client is used for acquiring the container mirror image files from the container server and further developing the container mirror image files. The container mirroring service system shown in fig. 1 exemplarily shows two container clients CT1 and CT2 and one container server. The user may specify information such as an identifier of the container image file in the CT1 and the CT2, so that the CT1 and the CT2 obtain the container image file from the container server.
It is understood that the container image files obtained by the CT1 and the CT2 may be different, and the CT1 and the CT2 may obtain one or more container image files from the container server at a time.
In the prior art, a container image file acquired from a container server is related to a processor of a pulled container client. For example, if the processor of the container client is X86, the obtained container image file is a container image file suitable for the X86 processor; and if the processor of the container client is ARM, the acquired container image file is a container image file suitable for the ARM processor.
In order to implement the above-mentioned processor-based container image acquisition, processor information applicable to each container image file may be indicated by a field in the image list. Thus, when the container client obtains an image file from the container server, the processor information is specified to obtain the corresponding container image file. However, the above scheme has certain limitations, and when a scene to which a container image file is applicable is added, a field needs to be added in the image list, so that when the scene to which the container image file is applicable is more, more fields need to be matched when the container image file is acquired, and the complexity of acquiring the container image file is higher.
In order to solve the above technical problem, an embodiment of the present invention provides a method for acquiring a container image, which may allow a user to add a custom scene tag to a container image file to indicate various scenes to which the container image file is applicable. For example, processor information, operating system type, operating system kernel, operating system version, etc. to which the container image file applies may be represented by a scenario tag. Therefore, fields needing to be matched when the container image file is obtained can be effectively reduced, and the method is favorable for reducing the complexity of obtaining the container image file.
The following describes the technical solution of the present invention and how to solve the above technical problems with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present invention will be described below with reference to the accompanying drawings.
Referring to fig. 2, fig. 2 is a flowchart of steps of a method for acquiring a container mirror image according to an embodiment of the present invention, where the method is applied to a container server, and the steps of the method are executed by the container server, where the method includes S101 to S103:
s101: receiving a mirror image obtaining instruction sent by a container client, wherein the mirror image obtaining instruction carries a first scene label, and the first scene label is used for representing information of the container client.
The information of the container client may include, but is not limited to: processor information of the container client, operating system type, operating system kernel, operating system version of the container client. The processor information of the container client may include the architecture of the processor, etc.
It is to be understood that the first scenario tag is a user-defined scenario tag that is input by a user in the container client.
S102: and if at least one mirror image information item containing a second scene tag exists in the target mirror image list, acquiring the target mirror image information item from the target mirror image list, wherein the second scene tag of the target mirror image information item is matched with the first scene tag, and the first scene tag and the second scene tag are user-defined tags.
The target mirror image list comprises one or more mirror image information items, each mirror image information item corresponds to one container mirror image file, and the mirror image information items are used for representing information of the corresponding container mirror image files. The information of the container image file includes, but is not limited to: the address, type, size, digest, applicable processor information, applicable operating system type, second scene tag, etc. of the container image file.
For the docker container, the name of the target mirror list is manifest, and the name of each mirror information item in the target mirror list is manifest. The target image list can be understood as a configuration file, wherein the information is flexibly configured. The configuration file may be a JS (java script) file, so that creating the configuration file is based on configuring each mirror information item based on an empty JS file.
The structure of the above-described target mirror list is exemplified below.
Figure BDA0003130749720000051
Figure BDA0003130749720000061
In the above-mentioned destination mirror list, the label "schema version" is used to indicate the number of mirror information items included in the destination mirror list. The label "mediaType" is used to indicate the type of the target mirror list and mirror information item, and is indicated by one character string. The label "size" is used to indicate the size of the mirrored information item. The label "digest" is used to represent a digest of the mirrored information item and can be considered as a unique identification of the mirrored information item. "platform" is a label in the prior art for indicating a device suitable for a manifest, and specifically relates to processor information "architecture" of the device and an operating system type "os" of the device, and "tag" is a second scene label of the manifest.
The target mirror list comprises two mirror information items, wherein the second scene label of one mirror information item is 'kernel-3.10', and the second scene label of the other mirror information item is 'kernel-4.19.90'.
For the mirror information item with the second scene label of "kernel-3.10", the applicable operating system type is linux, and the applicable processor information is mips. It can be seen that, in the embodiment of the present invention, a second scene tag "kernel-3.10" may be used, that is, the container image file corresponding to the image information item is applicable to the device with the operating system type linux and the processor information mips.
For the mirror image information item with the second scene label of "kernel-4.19.90", the applicable operating system type is unix, and the applicable processor information is arm 64. It can be seen that, in the embodiment of the present invention, a second scene tag "kernel-4.19.90" may be used, that is, the container image file corresponding to the image information item is applicable to the device with the operating system type unix and the processor information arm 64.
Therefore, two labels of 'architecture' and 'os' can be deleted in the target mirror image list, so that the information duplication with the 'tag' is avoided, and the information redundancy is reduced.
Of course, the second scenario tag "may represent an operating system kernel, an operating system version, in addition to processor information and operating system type. That is, the first scene tag is used to represent operating system information and processor information used by the container client, the second scene tag is used to represent operating system information and processor information applicable to the container image file corresponding to the corresponding image information item, and the operating system information includes: operating system type, operating system kernel, operating system version. Therefore, the user-defined second scene tag' can flexibly represent various information of equipment suitable for the container image file, the container image file can be downloaded by matching with one tag, the number of tags required to be matched when the container image file is obtained is reduced, and the complexity of obtaining the container image file is reduced.
It can be understood that the mirror information items in the target mirror list correspond to container mirror files stored in the container server. When a container image file is newly added, the container image file is not only stored in the container server, but also an image information item corresponding to the container image file is added to a target image list in the container server. When a container image file is deleted, the container image file is deleted from the container server, and an image information item corresponding to the container image file is also deleted from a target image list in the container server.
When one second scene label in the target mirror image list is matched with the first scene label, determining that the mirror image information item where the second scene label is located is a target mirror image information item, and determining the container mirror image file corresponding to the target mirror image information item as the container mirror image file acquired by the user.
In an embodiment, the mirror image obtaining instruction carries first reference information in addition to the first scene tag, where the first reference information includes at least one of: processor information of a container client and an operating system type of the container client; if at least one mirror image information item containing a second scene tag exists in the target mirror image list, acquiring the target mirror image information item from the target mirror image list, wherein the second scene tag of the target mirror image information item is matched with the first scene tag, and the method specifically comprises the following steps:
if at least one first mirror image information item containing a second scene label and second reference information exists in the target mirror image list, a second mirror image information item is obtained from the first mirror image information item, the second scene label of the second mirror image information item is matched with the first scene label, and the second reference information of the second mirror image information item is matched with the first reference information.
The first mirror image information item is a mirror image information item which comprises a second scene label and second reference information in the target mirror image list, and the second reference information comprises processor information and an operating system type of a container client applicable to a container mirror image file corresponding to the container mirror image information item.
In the embodiment of the present invention, in order to reduce the complexity of acquiring the container image file, a plurality of image lists may be stored in the container server, where each image list includes one or more image information items. Thus, when acquiring a container image file, it can be specified that a corresponding image information item is acquired from one of the image lists. Therefore, the number of mirror image information items needing to be matched is reduced, the complexity of determining the target mirror image information items is improved and reduced, and the complexity of obtaining the container mirror image file is further reduced.
Based on the above description, the mirror image obtaining instruction further carries a target list identifier, and after receiving the mirror image obtaining instruction, the container server may further obtain a mirror image list corresponding to the target list identifier as a target mirror image list before performing S102.
In the embodiment of the present invention, a plurality of mirror lists may be stored in the container server, and each mirror list is represented by a unique list identifier.
Optionally, the mirror list is generated in advance by the following steps and stored in the container server:
and receiving at least one container mirror image file and a mirror image list sent by the container client, wherein at least one mirror image information item in the mirror image list corresponds to the at least one container mirror image file respectively.
It can be understood that the container client may pre-make the container image file and the corresponding image list, and send the container image file and the corresponding image list to the container server for storage.
In the embodiment of the present invention, the container image file corresponding to each image list is a series of related container image files, and are usually used together. Of course, each mirrored list may specify a list identification.
S103: and sending the container image file corresponding to the target image information item to a container client.
After the container client receives the container image file, the user can perform re-development in the container client based on the container image file to realize further enhanced functions.
Referring to fig. 3, fig. 3 is a flowchart of steps of a method for acquiring a container image according to an embodiment of the present invention, where the method is applied to a container client, and the steps of the method are executed by the container client, where the method includes S201 to S202:
s201: and sending a mirror image acquisition instruction to the container server, wherein the mirror image acquisition instruction carries a first scene label, the first scene label is a user-defined label, and the first scene label is used for representing the information of the container client.
Wherein the image acquisition instruction is generated after the user inputs the first scene tag in the container client. Of course, the user may also input the first reference information.
In one embodiment, the first scene tag is input to the container end by a user in a command line form, extracted and encapsulated by the container end to form a mirror image acquisition instruction, and sent to the container server end.
S202: and receiving a container mirror image file corresponding to the first scene label sent by the container server.
This step is an execution step of the container client corresponding to S103.
Optionally, the container client may generate the mirror list and the container mirror file in advance by: firstly, generating at least one container mirror image file which is used under the information of at least one client; generating a mirror image list, wherein the mirror image list comprises at least one mirror image information item corresponding to the at least one container mirror image file, the mirror image information item comprises a second scene tag of the corresponding container mirror image file, the second scene tag is a user-defined tag, and the second scene tag is used for representing information of a container client applicable to the container mirror image file; and sending the at least one container image file and the image list to the container server.
It will be appreciated that the container image file generated on the container client may be applicable to the remaining container clients that have the same information as the container client.
Optionally, the information of the container client includes at least one of the following information: operating system type, operating system kernel, operating system version, processor information.
It can be seen that fig. 2 and fig. 3 respectively show the implementation processes of the container server and the container client in the container mirror image obtaining method.
Referring to fig. 4, fig. 4 is a schematic diagram of an interaction process between a container server and a container client according to an embodiment of the present invention, which specifically includes:
s301: the container client sends a mirror image acquisition instruction to the container server, wherein the mirror image acquisition instruction carries a first scene label, and the first scene label is used for representing information of the container client.
Accordingly, the container service end receives the mirror image acquisition instruction sent by the container client.
S302: if at least one mirror image information item containing a second scene label exists in the target mirror image list, the container server side obtains the target mirror image information item from the target mirror image list, the second scene label of the target mirror image information item is matched with the first scene label, and the first scene label and the second scene label are user-defined labels.
S303: and the container server sends the container image file corresponding to the target image information item to the container client.
Correspondingly, the container client receives the container image file corresponding to the first scene label sent by the container server.
The method embodiment is a combination of the method embodiments shown in fig. 2 and fig. 3, and specific reference may be made to detailed descriptions in the method embodiments shown in fig. 2 and fig. 3, which are not described herein again.
Referring to fig. 5, fig. 5 is a block diagram of a structure of a container server according to an embodiment of the present invention, where the structure includes:
the mirror image obtaining instruction receiving module 401 is configured to receive a mirror image obtaining instruction sent by a container client, where the mirror image obtaining instruction carries a first scene tag, and the first scene tag is used to represent information of the container client.
A target mirror image information item obtaining module 402, configured to, if at least one mirror image information item including a second scene tag exists in a target mirror image list, obtain the target mirror image information item from the target mirror image list, where the second scene tag of the target mirror image information item is matched with the first scene tag, and the first scene tag and the second scene tag are user-defined tags.
An image file sending module 403, configured to send the container image file corresponding to the target image information item to the container client.
Optionally, the first scene tag is configured to represent operating system information and processor information used by the container client, and the second scene tag is configured to represent operating system information and processor information applicable to a container image file corresponding to a corresponding image information item, where the operating system information includes: operating system type, operating system kernel, operating system version.
Optionally, the mirror image obtaining instruction further carries a target list identifier, and the container server further includes:
and the target mirror image list acquisition module is used for acquiring a mirror image list corresponding to the target list identification as a target mirror image list.
Optionally, the container server further includes:
the image file and list receiving module is used for receiving at least one container image file and an image list sent by the container client, wherein at least one image information item in the image list corresponds to the at least one container image file respectively.
The container server provided in the embodiment of the present invention may be configured to execute the technical solution of the method embodiment shown in fig. 2, and the implementation principle and the technical effect are similar, which are not described herein again.
Referring to fig. 6, fig. 6 is a block diagram of a structure of a container client according to an embodiment of the present invention, where the structure includes:
the mirror image instruction sending module 501 is configured to send a mirror image obtaining instruction to a container server, where the mirror image obtaining instruction carries a first scene tag, the first scene tag is a user-defined tag, and the first scene tag is used to represent information of the container client.
An image receiving module 502, configured to receive the container image file corresponding to the first scene tag sent by the container server.
Optionally, the container client further includes:
and the image file generating module is used for generating at least one container image file which is used under the information of at least one client.
The system comprises a mirror image list generating module, a mirror image list generating module and a mirror image list generating module, wherein the mirror image list comprises at least one mirror image information item corresponding to at least one container mirror image file respectively, the mirror image information item comprises a second scene label of the corresponding container mirror image file, the second scene label is a user-defined label, and the second scene label is used for representing information of a container client applicable to the container mirror image file.
And the image file and list sending module is used for sending the at least one container image file and the image list to the container server.
Optionally, the information of the container client includes at least one of the following information: operating system type, operating system kernel, operating system version, processor information.
The container client provided in the embodiment of the present invention may be configured to execute the technical solution of the method embodiment shown in fig. 3, and the implementation principle and the technical effect are similar, which are not described herein again.
Both the container client and the container server may be electronic devices, and fig. 7 is a block diagram illustrating an exemplary configuration of an electronic device 600 according to an embodiment of the present invention. The electronic device 600 comprises a memory 602 and at least one processor 601;
wherein the memory 602 stores computer-executable instructions;
when the electronic device 600 is a container server, the at least one processor 601 executes computer-executable instructions stored in the memory 602, so that the container server implements the method in fig. 2;
when the electronic device 600 is a container client, the at least one processor 601 executes the computer-executable instructions stored by the memory 602, so that the container client implements the method of fig. 3 as described above;
in addition, the electronic device may further include a receiver 603 and a transmitter 604, the receiver 603 being configured to receive information from the remaining apparatuses or devices and forward the information to the processor 601, and the transmitter 604 being configured to transmit the information to the remaining apparatuses or devices.
The electronic device is an embodiment of an apparatus corresponding to the method shown in fig. 2 and fig. 3, and specifically, reference may be made to detailed descriptions of the method embodiment shown in fig. 2 or fig. 3, which are not described herein again.
Embodiments of the present invention also provide a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a container server, the method shown in fig. 2 is implemented, and when the computer-executable instructions are executed by a container client, the method shown in fig. 3 is implemented.
The embodiment of the invention also provides a container mirror image service system which can comprise the container service end and the container client.
An embodiment of the present invention further provides a computer program, where the computer program is used to implement the method shown in fig. 2 or fig. 3.
The foregoing description is only exemplary of the preferred embodiments of the invention and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents is encompassed without departing from the spirit of the disclosure. For example, the above features and (but not limited to) features having similar functions disclosed in the present invention are mutually replaced to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the invention. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (14)

1. A method for acquiring a container mirror image is applied to a container server and comprises the following steps:
receiving a mirror image acquisition instruction sent by a container client, wherein the mirror image acquisition instruction carries a first scene label which is used for representing information of the container client;
if at least one mirror image information item containing a second scene tag exists in a target mirror image list, acquiring the target mirror image information item from the target mirror image list, wherein the second scene tag of the target mirror image information item is matched with the first scene tag, and the first scene tag and the second scene tag are user-defined tags;
and sending the container image file corresponding to the target image information item to the container client.
2. The method according to claim 1, wherein the first scene tag is used to represent operating system information and processor information used by the container client, and the second scene tag is used to represent operating system information and processor information applicable to a container image file corresponding to a corresponding image information item, and the operating system information includes: operating system type, operating system kernel, operating system version.
3. The method according to claim 1 or 2, wherein the image acquisition instruction further carries a target list identifier, the method further comprising:
and acquiring a mirror image list corresponding to the target list identification as a target mirror image list.
4. The method according to claim 1 or 2, characterized in that the method further comprises:
receiving at least one container image file and an image list sent by the container client, wherein at least one image information item in the image list corresponds to the at least one container image file respectively, the image information item comprises a second scene tag of the corresponding container image file, the second scene tag is a user-defined tag, and the second scene tag is used for representing information of the container client applicable to the container image file.
5. A container mirror image acquisition method is applied to a container client and comprises the following steps:
sending a mirror image acquisition instruction to a container server, wherein the mirror image acquisition instruction carries a first scene tag, the first scene tag is a user-defined tag, and the first scene tag is used for representing information of the container client;
and receiving the container image file corresponding to the first scene label sent by the container server.
6. The method of claim 5, further comprising:
generating at least one container mirror image file used under the information of at least one client;
generating a mirror image list, wherein the mirror image list comprises at least one mirror image information item corresponding to the at least one container mirror image file, the mirror image information item comprises a second scene tag of the corresponding container mirror image file, the second scene tag is a user-defined tag, and the second scene tag is used for representing information of a container client applicable to the container mirror image file;
and sending the at least one container image file and the image list to the container server.
7. The method of claim 6, wherein the information of the container client comprises at least one of the following information: operating system type, operating system kernel, operating system version, processor information.
8. A container server, comprising:
the system comprises a mirror image acquisition instruction receiving module, a mirror image acquisition module and a mirror image acquisition module, wherein the mirror image acquisition instruction receiving module is used for receiving a mirror image acquisition instruction sent by a container client, the mirror image acquisition instruction carries a first scene label, and the first scene label is used for representing information of the container client;
a target mirror image information item obtaining module, configured to obtain a target mirror image information item from a target mirror image list if at least one mirror image information item including a second scene tag exists in the target mirror image list, where the second scene tag of the target mirror image information item is matched with the first scene tag, and the first scene tag and the second scene tag are user-defined tags;
and the mirror image file sending module is used for sending the container mirror image file corresponding to the target mirror image information item to the container client.
9. A container client, comprising:
the system comprises a mirror image instruction sending module, a container client and a mirror image acquiring module, wherein the mirror image acquiring module is used for sending a mirror image acquiring instruction to the container server, the mirror image acquiring instruction carries a first scene label, the first scene label is a label defined by a user, and the first scene label is used for representing information of the container client;
and the image file receiving module is used for receiving the container image file corresponding to the first scene label sent by the container server.
10. A container server, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executes computer-executable instructions stored by the memory to cause the container server to implement the method of any one of claims 1 to 4.
11. A container client, comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executing the memory-stored computer-executable instructions to cause the container client to implement the method of any of claims 5 to 7.
12. A container mirroring service system, comprising: the container server according to claim 8 or 10 and the container client according to claim 9 or 11.
13. A computer-readable storage medium having stored thereon computer-executable instructions for implementing the method of any one of claims 1 to 4 when executed by a container server, and for implementing the method of any one of claims 5 to 7 when executed by a container client.
14. A computer program for implementing the method according to any one of claims 1 to 4 or 5 to 7.
CN202110704844.4A 2021-06-24 2021-06-24 Container mirror image obtaining method and device Pending CN113407308A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110704844.4A CN113407308A (en) 2021-06-24 2021-06-24 Container mirror image obtaining method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110704844.4A CN113407308A (en) 2021-06-24 2021-06-24 Container mirror image obtaining method and device

Publications (1)

Publication Number Publication Date
CN113407308A true CN113407308A (en) 2021-09-17

Family

ID=77682938

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110704844.4A Pending CN113407308A (en) 2021-06-24 2021-06-24 Container mirror image obtaining method and device

Country Status (1)

Country Link
CN (1) CN113407308A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7855818B2 (en) * 2007-03-07 2010-12-21 Ricoh Company, Limited Optical scanning apparatus and image forming apparatus
CN105487880A (en) * 2015-06-25 2016-04-13 哈尔滨安天科技股份有限公司 Mirror image distribution and use method based on service request and mirror image distribution and use system based on service request
CN106201648A (en) * 2016-06-27 2016-12-07 浪潮电子信息产业股份有限公司 A kind of virtual machine creation method and device
CN106776149A (en) * 2017-01-04 2017-05-31 郑州云海信息技术有限公司 Local container mirror image is uploaded to the method and system in mirror image warehouse
WO2017173798A1 (en) * 2016-04-07 2017-10-12 乐视控股(北京)有限公司 System installation method, device, and electronic apparatus for mobile terminal
CN107623870A (en) * 2017-09-29 2018-01-23 北京盛世辉科技有限公司 Control method, device, equipment and computer-readable recording medium
CN110187954A (en) * 2019-04-23 2019-08-30 平安科技(深圳)有限公司 Using mirror image method for pushing, device, computer equipment and storage medium
US20200012506A1 (en) * 2018-07-03 2020-01-09 Pivotal Software, Inc. Light-weight mirror container

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7855818B2 (en) * 2007-03-07 2010-12-21 Ricoh Company, Limited Optical scanning apparatus and image forming apparatus
CN105487880A (en) * 2015-06-25 2016-04-13 哈尔滨安天科技股份有限公司 Mirror image distribution and use method based on service request and mirror image distribution and use system based on service request
WO2017173798A1 (en) * 2016-04-07 2017-10-12 乐视控股(北京)有限公司 System installation method, device, and electronic apparatus for mobile terminal
CN106201648A (en) * 2016-06-27 2016-12-07 浪潮电子信息产业股份有限公司 A kind of virtual machine creation method and device
CN106776149A (en) * 2017-01-04 2017-05-31 郑州云海信息技术有限公司 Local container mirror image is uploaded to the method and system in mirror image warehouse
CN107623870A (en) * 2017-09-29 2018-01-23 北京盛世辉科技有限公司 Control method, device, equipment and computer-readable recording medium
US20200012506A1 (en) * 2018-07-03 2020-01-09 Pivotal Software, Inc. Light-weight mirror container
CN110187954A (en) * 2019-04-23 2019-08-30 平安科技(深圳)有限公司 Using mirror image method for pushing, device, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陆志刚等: "基于分片复用的多版本容器镜像加载方法", 《软件学报》 *

Similar Documents

Publication Publication Date Title
CN109766082B (en) Method and device for application program page jump
US11237844B2 (en) Method and apparatus for loading kernel module
US9400703B2 (en) Method and system for transforming input data streams
US20140007074A1 (en) Methods for updating applications
US8825750B2 (en) Application server management system, application server management method, management apparatus, application server and computer program
CN105955805A (en) Application container transferring method and device
CN113312032B (en) Front-end project resource updating method and device, electronic equipment and storage medium
CN113138768B (en) Application package generation method and device, electronic equipment and readable storage medium
US20220311673A1 (en) Method for Onboarding a Network Function Package in ONAP
CN110727524A (en) Method and device for realizing remote procedure call
CN113934559B (en) Application program query method, device, equipment and storage medium
CN111338666A (en) Method, device, medium and electronic equipment for realizing application program upgrading
CN113407308A (en) Container mirror image obtaining method and device
CN115361382B (en) Data processing method, device, equipment and storage medium based on data group
CN112463268A (en) Application data processing method, device, equipment and storage medium
CN110505289A (en) Document down loading method and device, computer-readable medium, wireless telecom equipment
EP2680135B1 (en) Methods for updating applications
CN113805858B (en) Method and device for continuously deploying software developed by scripting language
CN115378937A (en) Distributed concurrency method, device and equipment for tasks and readable storage medium
CN113765983B (en) Site service deployment method and device
CN114217911A (en) Cross-chain transaction processing method, device, computing equipment and medium
CN111414566B (en) Method and device for pushing information
CN115080241B (en) Data processing method and device
CN106257538B (en) Thumbnail downloading method and device
CN114579520B (en) Mirror image data processing method, mirror image data loading method and device

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210917

RJ01 Rejection of invention patent application after publication