CN108170511A - A kind of docker mirror images acquisition methods, device, equipment and storage medium - Google Patents

A kind of docker mirror images acquisition methods, device, equipment and storage medium Download PDF

Info

Publication number
CN108170511A
CN108170511A CN201711435407.7A CN201711435407A CN108170511A CN 108170511 A CN108170511 A CN 108170511A CN 201711435407 A CN201711435407 A CN 201711435407A CN 108170511 A CN108170511 A CN 108170511A
Authority
CN
China
Prior art keywords
mirror
docker
mirror image
target
mirror images
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
CN201711435407.7A
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.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies 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 Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN201711435407.7A priority Critical patent/CN108170511A/en
Publication of CN108170511A publication Critical patent/CN108170511A/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/70Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
    • G06F21/71Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information
    • G06F21/74Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure computing or processing of information operating in dual or compartmented mode, i.e. at least one secure mode
    • 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
    • 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/45575Starting, stopping, suspending or resuming virtual machine instances
    • 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/45587Isolation or security of virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Physics (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a kind of docker mirror images acquisition methods, device, equipment and storage medium, this method to include the following steps:It receives target docker hosts and pulls request for target docker mirror images;If target docker mirror images are publicly-owned mirror image, the Mirror Info of target docker mirror images is obtained by publicly-owned mirror image platform;Determine target docker mirror images whether are stored in mirror image warehouse;If it is, return to target docker mirror images to target docker hosts;If it is not, then downloading target docker mirror images from publicly-owned mirror image platform, target docker hosts are returned to, and target docker mirror images are stored in mirror image warehouse.The technical solution provided using the embodiment of the present invention, improves and pulls speed, avoids frequent exposure of the docker hosts in internet, improves the safety of docker hosts.

Description

A kind of docker mirror images acquisition methods, device, equipment and storage medium
Technical field
The present invention relates to computer application technologies, more particularly to a kind of docker mirror images acquisition methods, device, set Standby and storage medium.
Background technology
With the fast development of Computer Applied Technology, docker technologies are also widely applied.Docker is one The application container engine increased income can be easily any application one lightweight of establishment, transplantable, self-centered appearance Device.Docker hosts can carry out pulling mirror image, operation container, submit containers and the mirror image operations such as mirror image.Docker mirror images are Read-only container template, as the basis for starting a docker container, how quick obtaining docker mirror images seem heavy to closing It will.
Docker mirror images are divided into privately owned mirror image and publicly-owned mirror image, mirror image of the privately owned mirror image for user oneself, publicly-owned mirror image To open into the mirror image in network.In the prior art, privately owned mirror image stores in privately owned warehouse, and publicly-owned mirror image is in publicly-owned mirror image It is stored in platform.Docker hosts can get required publicly-owned mirror after being connected to internet in publicly-owned mirror image platform Picture.
But this method has some disadvantages, because no matter which platform docker host is needing to obtain publicly-owned mirror image When, being required for being connected to behind internet could be to corresponding publicly-owned mirror image be obtained in publicly-owned mirror image platform, even if a certain docker Host downloaded a certain publicly-owned mirror image, other docker hosts in same LAN must also be re-downloaded and could be obtained, and drew Take speed slower, there are larger security risks moreover, docker hosts are frequently exposed in internet.
Invention content
The object of the present invention is to provide a kind of docker mirror images acquisition methods, device, equipment and storage medium, to improve public affairs Have mirror image pulls speed, and docker hosts is avoided to be frequently exposed in internet, improves the safety of docker hosts.
In order to solve the above technical problems, the present invention provides following technical solution:
A kind of docker mirror images acquisition methods, applied to the controller in mirror image warehouse, the controller is described with sharing Multiple docker main-machine communications connection in mirror image warehouse, the method includes:
It receives target docker hosts and pulls request for target docker mirror images, the target docker hosts are more Any one in a docker hosts;
If the target docker mirror images are publicly-owned mirror image, the target docker is obtained by publicly-owned mirror image platform The Mirror Info of mirror image;
According to the Mirror Info, determine the target docker mirror images whether are stored in the mirror image warehouse;
If it is, return to the target docker mirror images to the target docker hosts;
If it is not, then downloading the target docker mirror images from the publicly-owned mirror image platform, the target is returned to Docker hosts, and the target docker mirror images are stored in the mirror image warehouse.
In a kind of specific embodiment of the present invention, privately owned mirror image, the method are also stored in the mirror image warehouse It further includes:
If the target docker mirror images are privately owned mirror image, it is determined that whether are stored with the mesh in the mirror image warehouse Mark docker mirror images;
If it is, the step of performing the return target docker mirror images to the target docker hosts, no Then return to error message.
It is described according to the Mirror Info in a kind of specific embodiment of the present invention, it determines in the mirror image warehouse Whether the target docker mirror image is stored with, including:
According to the Mirror Info, the Image Planes of the composition target docker mirror images are determined;
If all Image Planes for forming the target docker mirror images are stored in the mirror image warehouse, it is determined that described The target docker mirror images are stored in mirror image warehouse.
It is described to download the target from the publicly-owned mirror image platform in a kind of specific embodiment of the present invention Docker mirror images, including:
For each Image Planes for forming the target docker mirror images, if not being stored with the mirror in the mirror image warehouse As layer, then the Image Planes are downloaded from the publicly-owned mirror image platform.
A kind of docker mirror images acquisition device, applied to the controller in mirror image warehouse, the controller is described with sharing Multiple docker main-machine communications connection in mirror image warehouse, described device include:
Request receiving module is pulled, request is pulled for target docker mirror images for receiving target docker hosts, The target docker hosts are any one in multiple docker hosts;
Mirror Info acquisition module, for when the target docker mirror images are publicly-owned mirror image, being put down by publicly-owned mirror image Platform obtains the Mirror Info of the target docker mirror images;
First storage determining module, for according to the Mirror Info, determining whether stored in the mirror image warehouse State target docker mirror images;If it is, triggering mirror image returns to module, if it is not, then triggering download storage module;
The mirror image returns to module, for returning to the target docker mirror images to the target docker hosts;
The download storage module for downloading the target docker mirror images from the publicly-owned mirror image platform, returns To the target docker hosts, and the target docker mirror images are stored in the mirror image warehouse.
In a kind of specific embodiment of the present invention, privately owned mirror image, described device are also stored in the mirror image warehouse The second storage determining module is further included, is used for:
When the target docker mirror images are privately owned mirror image, determine whether be stored with the target in the mirror image warehouse Docker mirror images;If it is, triggering the mirror image returns to module, error message is otherwise returned.
In a kind of specific embodiment of the present invention, the first storage determining module is specifically used for:
According to the Mirror Info, the Image Planes of the composition target docker mirror images are determined;
If all Image Planes for forming the target docker mirror images are stored in the mirror image warehouse, it is determined that described The target docker mirror images are stored in mirror image warehouse.
In a kind of specific embodiment of the present invention, the download storage module is specifically used for:
For each Image Planes for forming the target docker mirror images, if not being stored with the mirror in the mirror image warehouse As layer, then the Image Planes are downloaded from the publicly-owned mirror image platform.
A kind of docker mirror images obtain equipment, and applied to the controller in mirror image warehouse, the controller is described with sharing Multiple docker main-machine communications connection in mirror image warehouse, the equipment include:
Memory, for storing computer program;
Processor realizes docker mirror image acquisition methods described in any of the above-described during for performing the computer program Step.
A kind of computer readable storage medium is stored with computer program on the computer readable storage medium, described The step of docker mirror image acquisition methods described in any of the above-described are realized when computer program is executed by processor.
The technical solution provided using the embodiment of the present invention, the controller in mirror image warehouse are receiving target docker Host is directed to when pulling request of target docker mirror images, if it is determined that target docker mirror images are publicly-owned mirror image, then can lead to The Mirror Info that publicly-owned mirror image platform obtains target docker mirror images is crossed, according to Mirror Info, it may be determined that mirror image is in warehouse It is no to be stored with target docker mirror images, if be stored with, target docker mirror images can be returned to target docker hosts, such as Fruit is not stored with, then target docker mirror images can be downloaded from publicly-owned mirror image platform, returns to target docker hosts, and Target docker mirror images are stored in mirror image warehouse.Mirror image warehouse can be stored directly in by the docker mirror images in mirror image warehouse In, docker hosts can directly pull corresponding docker mirror images from mirror image warehouse, improve and pull speed, moreover, logical It crosses mirror image warehouse to keep apart docker hosts with internet, docker hosts, which do not need to connection internet, can obtain accordingly Docker mirror images avoid frequent exposure of the docker hosts in internet, improve the safety of docker hosts.
Description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention, for those of ordinary skill in the art, without creative efforts, can be with Other attached drawings are obtained according to these attached drawings.
Fig. 1 is the structure diagram that a kind of docker mirror images obtain system in the embodiment of the present invention;
Fig. 2 is a kind of implementing procedure figure of docker mirror images acquisition methods in the embodiment of the present invention;
Fig. 3 is a kind of structure diagram of docker mirror images acquisition device in the embodiment of the present invention;
Fig. 4 is the structure diagram that a kind of docker mirror images obtain equipment in the embodiment of the present invention.
Specific embodiment
The core of the present invention is to provide a kind of docker mirror images acquisition methods, and this method can be applied in mirror image warehouse Controller, controller are connect with multiple docker main-machine communications in shared mirror image warehouse, as shown in Figure 1, can be in mirror image warehouse Docker mirror images are stored, docker hosts can pull corresponding docker mirror images from mirror image warehouse, and mirror image warehouse can be with Publicly-owned mirror image platform is connected, i.e., controller may also access publicly-owned mirror image platform, corresponding without storage in mirror image warehouse During docker mirror images, corresponding docker mirror images can be got by publicly-owned mirror image platform, wherein, controller is in Fig. 1 not It shows.
In order to which those skilled in the art is made to more fully understand the present invention program, with reference to the accompanying drawings and detailed description The present invention is described in further detail.Obviously, described embodiment be only part of the embodiment of the present invention rather than Whole embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not making creative work premise Lower all other embodiments obtained, shall fall within the protection scope of the present invention.
The implementing procedure figure of a kind of docker mirror images acquisition methods shown in Figure 2, being provided by the embodiment of the present invention, This method may comprise steps of:
S210:It receives target docker hosts and pulls request for target docker mirror images.
Target docker hosts are any one in multiple docker hosts.
In practical applications, docker hosts can be pulled according to actual needs to controller transmission docker mirror images and be asked It asks.Controller is receiving target docker hosts for when pulling request of target docker mirror images, can continue to execute step The operation of rapid S220.Target docker hosts are any one in the multiple docker hosts communicated to connect with controller.
S220:If target docker mirror images are publicly-owned mirror image, target docker mirrors are obtained by publicly-owned mirror image platform The Mirror Info of picture.
Docker mirror images are divided into publicly-owned mirror image and privately owned mirror image.All publicly-owned mirror images are stored in publicly-owned mirror image platform And the Mirror Info of each publicly-owned mirror image.For any one docker mirror image, the Mirror Infos of the docker mirror images can be with The identification information of each Image Planes including forming the docker mirror images, the incidence relation information between Image Planes, the docker The description informations such as author information, the history modification information of mirror image.
Controller is receiving target docker hosts for when pulling request of target docker mirror images, can first determine Target docker mirror images are publicly-owned mirror image or privately owned mirror image.If target docker mirror images are publicly-owned mirror image, can pass through Publicly-owned mirror image platform obtains the Mirror Info of target docker mirror images.
S230:According to Mirror Info, determine target docker mirror images whether are stored in mirror image warehouse.
It, can basis after getting the Mirror Info of target docker mirror images by publicly-owned mirror image platform in step S220 Mirror Info determines target docker mirror images whether are stored in mirror image warehouse, if be stored with, can continue to execute step The operation of S240 if be not stored with, can continue to execute the operation of step S250.
S240:Target docker mirror images are returned to target docker hosts.
When being stored with target docker mirror images in determining mirror image warehouse, directly mesh can be returned to target docker hosts Mark docker mirror images.So that target docker hosts are performed based on operations such as target docker image starting docker containers.
S250:Target docker mirror images are downloaded from publicly-owned mirror image platform, return to target docker hosts, and in mirror image Target docker mirror images are stored in warehouse.
As described, all publicly-owned mirror images are stored in publicly-owned mirror image platform.It is not deposited in mirror image warehouse is determined When containing target docker mirror images, target docker mirror images can be downloaded from publicly-owned mirror image platform, and return to target Docker hosts.Meanwhile target docker mirror images can be stored in mirror image warehouse.In this way, work as other of shared mirror image warehouse Docker hosts are initiated for when pulling request of target docker mirror images, which does not need to connection internet, can Directly to pull target docker mirror images from mirror image warehouse, convenience and safety are improved.
The method provided using the embodiment of the present invention, the controller in mirror image warehouse are receiving target docker hosts For target docker mirror images when pulling request, if it is determined that target docker mirror images are publicly-owned mirror image, then can pass through public affairs There is the Mirror Info that mirror image platform obtains target docker mirror images, according to Mirror Info, it may be determined that whether deposited in mirror image warehouse Target docker mirror images are contained, if be stored with, target docker mirror images can be returned to target docker hosts, if not It is stored with, then target docker mirror images can be downloaded from publicly-owned mirror image platform, return to target docker hosts, and in mirror image Target docker mirror images are stored in warehouse.It can be stored directly in mirror image warehouse by the docker mirror images in mirror image warehouse, Docker hosts can directly pull corresponding docker mirror images from mirror image warehouse, improve and pull speed, moreover, passing through mirror As warehouse keeps apart docker hosts with internet, docker hosts, which do not need to connection internet, can obtain accordingly Docker mirror images avoid frequent exposure of the docker hosts in internet, improve the safety of docker hosts.
In practical applications, mirror image warehouse can include publicly-owned sub- warehouse and privately owned sub- warehouse, only be deposited in publicly-owned sub- warehouse The publicly-owned mirror image by mirror image warehouse is contained, privately owned mirror image is only stored in privately owned sub- warehouse.When the controller in mirror image warehouse connects Receive the transmission of target docker hosts is directed to when pulling request of target docker mirror images, if target docker mirror images are private There is mirror image, then can be directed toward privately owned sub- warehouse, to pull corresponding docker mirror images from privately owned sub- warehouse, if target Docker mirror images are publicly-owned mirror image, then publicly-owned sub- warehouse can be directed toward, to pull corresponding docker mirrors from publicly-owned sub- warehouse Picture.
In one embodiment of the invention, be also stored with privately owned mirror image in mirror image warehouse, this method can also include with Lower step:
If target docker mirror images are privately owned mirror image, it is determined that target docker mirrors whether are stored in mirror image warehouse Picture;If it is, returning to target docker mirror images to target docker hosts, error message is otherwise returned.
In embodiments of the present invention, the publicly-owned mirror image by mirror image warehouse had both been stored in mirror image warehouse, has also been stored with private There is mirror image.The preservation of privately owned mirror image and publicly-owned mirror image is combined to form a general mirror image warehouse.
When it is privately owned mirror image to determine target docker mirror images, it may be determined that whether be stored with target in mirror image warehouse Docker mirror images if be stored with, directly can return to target docker mirror images, if do not stored to target docker hosts Have, then can return to error message to target docker hosts.It, can be to hair after target docker hosts receive error message That send pulls whether request is correctly confirmed.
In a kind of specific embodiment of the present invention, step S230 may comprise steps of:
Step 1:According to Mirror Info, the Image Planes of composition target docker mirror images are determined;
Step 2:If all Image Planes of composition target docker mirror images are stored in mirror image warehouse, it is determined that mirror image Target docker mirror images are stored in warehouse.
In embodiments of the present invention, the publicly-owned mirror image by mirror image warehouse had both been stored in mirror image warehouse, has also been stored with private There is mirror image.Docker mirror images are the data structures of layering, are made of one or more Image Planes, each Image Planes have physically Image Planes file be corresponding to it, corresponding mark id can be obtained by SHA256 algorithms.
When target docker mirror images are publicly-owned mirror image, the mirror image of target docker mirror images is obtained by publicly-owned mirror image platform After information, according to Mirror Info, it may be determined that the Image Planes of composition target docker mirror images.Such as determine target docker mirror images by Image Planes A, Image Planes B, Image Planes C compositions.
If being stored with all Image Planes of composition target docker mirror images in mirror image warehouse, mirror image warehouse can be determined In be stored with target docker mirror images, so as to target docker hosts return target docker mirror images.
If being only stored with the partial image layer of composition target docker mirror images in mirror image warehouse, mirror image storehouse can be determined Target docker mirror images are not stored in library.In such a case, it is possible to target docker mirrors are downloaded from publicly-owned mirror image platform Picture.
Specifically, for each Image Planes of composition target docker mirror images, if not being stored with the mirror in mirror image warehouse As layer, then the Image Planes are downloaded from publicly-owned mirror image platform.
For any one the privately owned mirror image stored in mirror image warehouse, the partial image layer of the privately owned mirror image may be with The Image Planes of a certain publicly-owned mirror image are identical, i.e., privately owned mirror image and publicly-owned mirror image may have identical Image Planes, therebetween may be used With shared identical Image Planes.
As being stored with a certain privately owned mirror image in mirror image warehouse, which is made of Image Planes C, Image Planes D.When determining When target docker mirror images are made of Image Planes A, Image Planes B, Image Planes C, the Image Planes C and target docker of the privately owned mirror image The mirror image C of mirror image is identical.The Image Planes C of composition target docker mirror images is only stored in mirror image warehouse, is not stored with composition mesh Mark the Image Planes A of docker mirror images and Image Planes B.
For composition target docker mirror images each Image Planes, if the Image Planes are not stored in mirror image warehouse, The Image Planes are downloaded from publicly-owned mirror image platform.
As above in example, Image Planes A and Image Planes B can be downloaded from publicly-owned mirror image platform, download acquisition Image Planes A, Image Planes B can form target docker mirror images together with mirror image C stored in mirror image warehouse, so as to by target docker Mirror image returns to target docker hosts, and will be in Image Planes A and Image Planes B storages to mirror image warehouse so that in mirror image warehouse It is stored with target docker mirror images.The Image Planes of privately owned mirror image can be made full use of in this way, under reducing from publicly-owned mirror image platform The number of docker mirror images is carried, saving network flow improves docker mirror image utilization rates, and the disk for improving mirror image warehouse utilizes Rate.
In mirror image warehouse, for the Image Planes with same mark, one can be only stored, publicly-owned mirror image and privately owned mirror As the Image Planes of oneself can be found by the mark of Image Planes, achieve the purpose that Image Planes are shared, save depositing for mirror image warehouse Store up space.
Corresponding to above method embodiment, the embodiment of the present invention additionally provides a kind of docker mirror images acquisition device, should For the controller in mirror image warehouse, controller is connect with multiple docker main-machine communications in shared mirror image warehouse, is described below A kind of docker mirror images acquisition device can correspond reference with a kind of above-described docker mirror images acquisition methods.
Shown in Figure 3, which is included with lower module:
Request receiving module 310 is pulled, it please for pulling for target docker mirror images for receiving target docker hosts It asks, target docker hosts are any one in multiple docker hosts;
Mirror Info acquisition module 320, for when target docker mirror images are publicly-owned mirror image, passing through publicly-owned mirror image platform Obtain the Mirror Info of target docker mirror images;
First storage determining module 330, for according to Mirror Info, determining whether be stored with target in mirror image warehouse Docker mirror images;If it is, triggering mirror image returns to module 340, if it is not, then triggering download storage module 350;
Mirror image returns to module 340, for returning to target docker mirror images to target docker hosts;
Download storage module 350 for downloading target docker mirror images from publicly-owned mirror image platform, returns to target Docker hosts, and target docker mirror images are stored in mirror image warehouse.
The device provided using the embodiment of the present invention, the controller in mirror image warehouse are receiving target docker hosts For target docker mirror images when pulling request, if it is determined that target docker mirror images are publicly-owned mirror image, then can pass through public affairs There is the Mirror Info that mirror image platform obtains target docker mirror images, according to Mirror Info, it may be determined that whether deposited in mirror image warehouse Target docker mirror images are contained, if be stored with, target docker mirror images can be returned to target docker hosts, if not It is stored with, then target docker mirror images can be downloaded from publicly-owned mirror image platform, return to target docker hosts, and in mirror image Target docker mirror images are stored in warehouse.It can be stored directly in mirror image warehouse by the docker mirror images in mirror image warehouse, Docker hosts can directly pull corresponding docker mirror images from mirror image warehouse, improve and pull speed, moreover, passing through mirror As warehouse keeps apart docker hosts with internet, docker hosts, which do not need to connection internet, can obtain accordingly Docker mirror images avoid frequent exposure of the docker hosts in internet, improve the safety of docker hosts.
In a kind of specific embodiment of the present invention, it is also stored with privately owned mirror image in mirror image warehouse, device further includes the Two storage determining modules, are used for:
When target docker mirror images are privately owned mirror image, determine target docker mirror images whether are stored in mirror image warehouse; If it is, triggering mirror image returns to module 340, error message is otherwise returned.
In a kind of specific embodiment of the present invention, the first storage determining module 330 is specifically used for:
According to Mirror Info, the Image Planes of composition target docker mirror images are determined;
If all Image Planes of composition target docker mirror images are stored in mirror image warehouse, it is determined that mirror image is deposited in warehouse Contain target docker mirror images.
In a kind of specific embodiment of the present invention, download storage module 350 is specifically used for:
For composition target docker mirror images each Image Planes, if the Image Planes are not stored in mirror image warehouse, The Image Planes are downloaded from publicly-owned mirror image platform.
Corresponding to above method embodiment, the embodiment of the present invention additionally provides a kind of docker mirror images and obtains equipment, should For the controller in mirror image warehouse, controller is connect with multiple docker main-machine communications in shared mirror image warehouse.Such as Fig. 4 institutes Show, which includes:
Memory 410, for storing computer program;
The step of processor 420, for performing computer program when, realize above-mentioned docker mirror images acquisition methods.
Corresponding to above method embodiment, the embodiment of the present invention additionally provides a kind of computer readable storage medium, meter Computer program is stored on calculation machine readable storage medium storing program for executing, above-mentioned docker mirror images are realized when computer program is executed by processor The step of acquisition methods.
Each embodiment is described by the way of progressive in this specification, the highlights of each of the examples are with it is other The difference of embodiment, just to refer each other for same or similar part between each embodiment.For dress disclosed in embodiment It puts, for equipment, storage medium, since it is corresponded to the methods disclosed in the examples, so description is fairly simple, correlation Place is referring to method part illustration.
Professional further appreciates that, with reference to each exemplary unit of the embodiments described herein description And algorithm steps, can be realized with the combination of electronic hardware, computer software or the two, in order to clearly demonstrate hardware and The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These Function is performed actually with hardware or software mode, specific application and design constraint depending on technical solution.Profession Technical staff can realize described function to each specific application using distinct methods, but this realization should not Think beyond the scope of this invention.
It can directly be held with reference to the step of method or algorithm that the embodiments described herein describes with hardware, processor The combination of capable software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only deposit Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology In any other form of storage medium well known in field.
Specific case used herein is expounded the principle of the present invention and embodiment, and above example is said It is bright to be merely used to help understand technical scheme of the present invention and its core concept.It should be pointed out that for the common of the art For technical staff, without departing from the principle of the present invention, can also to the present invention some improvement and modification can also be carried out, these Improvement and modification are also fallen within the protection scope of the claims of the present invention.

Claims (10)

1. a kind of docker mirror images acquisition methods, which is characterized in that applied to the controller in mirror image warehouse, the controller with Multiple docker main-machine communications connection in the mirror image warehouse is shared, the method includes:
Pull request of the target docker hosts for target docker mirror images is received, the target docker hosts are multiple Any one in docker hosts;
If the target docker mirror images are publicly-owned mirror image, the target docker mirror images are obtained by publicly-owned mirror image platform Mirror Info;
According to the Mirror Info, determine the target docker mirror images whether are stored in the mirror image warehouse;
If it is, return to the target docker mirror images to the target docker hosts;
If it is not, then downloading the target docker mirror images from the publicly-owned mirror image platform, the target docker is returned to Host, and the target docker mirror images are stored in the mirror image warehouse.
It is 2. described according to the method described in claim 1, it is characterized in that, be also stored with privately owned mirror image in the mirror image warehouse Method further includes:
If the target docker mirror images are privately owned mirror image, it is determined that whether are stored with the target in the mirror image warehouse Docker mirror images;
If it is, the step of performing the return target docker mirror images to the target docker hosts, otherwise returns Return error message.
3. according to the method described in claim 2, it is characterized in that, described according to the Mirror Info, the mirror image storehouse is determined Whether the target docker mirror image is stored in library, including:
According to the Mirror Info, the Image Planes of the composition target docker mirror images are determined;
If all Image Planes for forming the target docker mirror images are stored in the mirror image warehouse, it is determined that the mirror image The target docker mirror images are stored in warehouse.
4. according to the method described in claim 3, it is characterized in that, described download the target from the publicly-owned mirror image platform Docker mirror images, including:
For each Image Planes for forming the target docker mirror images, if not being stored with the mirror image in the mirror image warehouse Layer, then download the Image Planes from the publicly-owned mirror image platform.
5. a kind of docker mirror images acquisition device, which is characterized in that applied to the controller in mirror image warehouse, the controller with Multiple docker main-machine communications connection in the mirror image warehouse is shared, described device includes:
Request receiving module is pulled, it is described for receiving pull request of the target docker hosts for target docker mirror images Target docker hosts are any one in multiple docker hosts;
Mirror Info acquisition module, for when the target docker mirror images are publicly-owned mirror image, being obtained by publicly-owned mirror image platform Take the Mirror Info of the target docker mirror images;
First storage determining module, for according to the Mirror Info, determining whether be stored with the mesh in the mirror image warehouse Mark docker mirror images;If it is, triggering mirror image returns to module, if it is not, then triggering download storage module;
The mirror image returns to module, for returning to the target docker mirror images to the target docker hosts;
The download storage module for downloading the target docker mirror images from the publicly-owned mirror image platform, returns to institute Target docker hosts are stated, and the target docker mirror images are stored in the mirror image warehouse.
6. device according to claim 5, which is characterized in that privately owned mirror image is also stored in the mirror image warehouse, it is described Device further includes the second storage determining module, is used for:
When the target docker mirror images are privately owned mirror image, determine whether be stored with the target in the mirror image warehouse Docker mirror images;If it is, triggering the mirror image returns to module, error message is otherwise returned.
7. device according to claim 6, which is characterized in that the first storage determining module is specifically used for:
According to the Mirror Info, the Image Planes of the composition target docker mirror images are determined;
If all Image Planes for forming the target docker mirror images are stored in the mirror image warehouse, it is determined that the mirror image The target docker mirror images are stored in warehouse.
8. device according to claim 7, which is characterized in that the download storage module is specifically used for:
For each Image Planes for forming the target docker mirror images, if not being stored with the mirror image in the mirror image warehouse Layer, then download the Image Planes from the publicly-owned mirror image platform.
9. a kind of docker mirror images obtain equipment, which is characterized in that applied to the controller in mirror image warehouse, the controller with Multiple docker main-machine communications connection in the mirror image warehouse is shared, the equipment includes:
Memory, for storing computer program;
Processor realizes the docker mirror images acquisition as described in any one of Claims 1-4 during for performing the computer program The step of method.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Program realizes the docker mirror images acquisition side as described in any one of Claims 1-4 when the computer program is executed by processor The step of method.
CN201711435407.7A 2017-12-26 2017-12-26 A kind of docker mirror images acquisition methods, device, equipment and storage medium Pending CN108170511A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711435407.7A CN108170511A (en) 2017-12-26 2017-12-26 A kind of docker mirror images acquisition methods, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711435407.7A CN108170511A (en) 2017-12-26 2017-12-26 A kind of docker mirror images acquisition methods, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN108170511A true CN108170511A (en) 2018-06-15

Family

ID=62521618

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711435407.7A Pending CN108170511A (en) 2017-12-26 2017-12-26 A kind of docker mirror images acquisition methods, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108170511A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109165191A (en) * 2018-09-12 2019-01-08 郑州云海信息技术有限公司 A kind of container volume data uploading method and device based on AI cloud
CN110908671A (en) * 2018-09-18 2020-03-24 北京京东尚科信息技术有限公司 Method and device for constructing docker mirror image and computer readable storage medium
CN111414180A (en) * 2020-03-18 2020-07-14 深圳力维智联技术有限公司 Terminal remote updating method, terminal remote updating equipment and computer readable storage medium
CN111538566A (en) * 2020-04-24 2020-08-14 咪咕文化科技有限公司 Mirror image file processing method, device and system, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106371889A (en) * 2016-08-22 2017-02-01 浪潮(北京)电子信息产业有限公司 Method and device for realizing high-performance cluster system for scheduling mirror images
CN106487850A (en) * 2015-08-29 2017-03-08 华为技术有限公司 The methods, devices and systems of mirror image are obtained under a kind of cloud environment
CN106506587A (en) * 2016-09-23 2017-03-15 中国人民解放军国防科学技术大学 A kind of Docker image download methods based on distributed storage
CN106899669A (en) * 2017-02-23 2017-06-27 郑州云海信息技术有限公司 A kind of enterprise's container mirror image method for building up and device based on Registry
CN107066310A (en) * 2017-03-11 2017-08-18 郑州云海信息技术有限公司 It is a kind of to build and using the method and device in the privately owned warehouses of safe Docker
CN107454188A (en) * 2017-08-28 2017-12-08 郑州云海信息技术有限公司 A kind of container creation method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106487850A (en) * 2015-08-29 2017-03-08 华为技术有限公司 The methods, devices and systems of mirror image are obtained under a kind of cloud environment
CN106371889A (en) * 2016-08-22 2017-02-01 浪潮(北京)电子信息产业有限公司 Method and device for realizing high-performance cluster system for scheduling mirror images
CN106506587A (en) * 2016-09-23 2017-03-15 中国人民解放军国防科学技术大学 A kind of Docker image download methods based on distributed storage
CN106899669A (en) * 2017-02-23 2017-06-27 郑州云海信息技术有限公司 A kind of enterprise's container mirror image method for building up and device based on Registry
CN107066310A (en) * 2017-03-11 2017-08-18 郑州云海信息技术有限公司 It is a kind of to build and using the method and device in the privately owned warehouses of safe Docker
CN107454188A (en) * 2017-08-28 2017-12-08 郑州云海信息技术有限公司 A kind of container creation method and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
许晓斌: "《Maven实战》", 31 January 2011 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109165191A (en) * 2018-09-12 2019-01-08 郑州云海信息技术有限公司 A kind of container volume data uploading method and device based on AI cloud
CN110908671A (en) * 2018-09-18 2020-03-24 北京京东尚科信息技术有限公司 Method and device for constructing docker mirror image and computer readable storage medium
CN111414180A (en) * 2020-03-18 2020-07-14 深圳力维智联技术有限公司 Terminal remote updating method, terminal remote updating equipment and computer readable storage medium
CN111538566A (en) * 2020-04-24 2020-08-14 咪咕文化科技有限公司 Mirror image file processing method, device and system, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN108170511A (en) A kind of docker mirror images acquisition methods, device, equipment and storage medium
US10846140B2 (en) Off-site backup of workloads for multi-tenant cloud computing system
US10412021B2 (en) Optimizing placement of virtual machines
CN106487850B (en) The methods, devices and systems of mirror image are obtained under a kind of cloud environment
CN106933648B (en) Method and system for multi-tenant container resource management
CN106970822A (en) A kind of container creation method and device
CN104461716B (en) The access method and multi-core heterogeneous system of a kind of multi-core heterogeneous system
CN105183495B (en) Coordinating Activity view is carried out in cross operating system domain
EP3618352A1 (en) Virtual machine management
US20180196603A1 (en) Memory Management Method, Apparatus, and System
CN104750372B (en) A kind of file sharing method and device
CN109739890A (en) Data processing method, device and equipment
CN106161110A (en) Data processing method in a kind of network equipment and system
CN103440111B (en) The extended method in magnetic disk of virtual machine space, host and platform
CN109992956A (en) The processing method and relevant apparatus of the security strategy of container
CN105302489B (en) A kind of remote embedded accumulator system of heterogeneous polynuclear and method
CN110460635A (en) One kind is towards unpiloted edge discharging method and device
CN105357042A (en) High-availability cluster system, master node and slave node
CN106294198B (en) A kind of memory allocation method and method for releasing of (SuSE) Linux OS
CN109634522A (en) A kind of method, apparatus and computer storage medium of resource management
US20190212924A1 (en) Sidefiles for management of data written via a bus interface to a storage controller during consistent copying of data
CN108399106A (en) The method and apparatus for managing physical host
CN109298888B (en) Queue data access method and device
US20200097344A1 (en) Enqueue-related processing based on timing out of an attempted enqueue
CN109032753A (en) A kind of isomery virtual hard disk trustship method, system, storage medium and Nova platform

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

Application publication date: 20180615