CN109491758A - Docker mirror image distribution method, system, data gateway and computer readable storage medium - Google Patents

Docker mirror image distribution method, system, data gateway and computer readable storage medium Download PDF

Info

Publication number
CN109491758A
CN109491758A CN201811185125.0A CN201811185125A CN109491758A CN 109491758 A CN109491758 A CN 109491758A CN 201811185125 A CN201811185125 A CN 201811185125A CN 109491758 A CN109491758 A CN 109491758A
Authority
CN
China
Prior art keywords
docker
mirror image
image file
data sharing
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
CN201811185125.0A
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.)
Shenzhen Onething Technology Co Ltd
Original Assignee
Shenzhen Onething 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 Shenzhen Onething Technology Co Ltd filed Critical Shenzhen Onething Technology Co Ltd
Priority to CN201811185125.0A priority Critical patent/CN109491758A/en
Publication of CN109491758A publication Critical patent/CN109491758A/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
    • 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/4557Distribution of virtual machine instances; Migration and load balancing

Abstract

The invention discloses a kind of docker mirror image distribution methods, this method comprises: receiving the request for the acquisition docker image file that client is sent;Signature check is carried out to the request;After verification passes through, available data sharing node is inquired from the tracker server of P2P network;P2P is established with available data sharing node described at least one to connect, and downloads the docker image file, and the docker image file downloaded is sent to the client.The present invention also provides a kind of docker mirror image dissemination system, docker mirror image distributing and processing system, data gateway and computer readable storage mediums.Docker mirror image distribution method and correspondence system, data gateway and computer readable storage medium provided by the invention can be realized the docker mirror image distribution of high efficiency in container service, low cost.

Description

Docker mirror image distribution method, system, data gateway and computer readable storage medium
Technical field
The present invention relates to shared computing technique field more particularly to a kind of docker mirror image distribution method and systems, data Gateway and computer readable storage medium.
Background technique
Current docker (application container engine) is widely used in enterprises and publicly-owned cloud service, docker mirror image Warehouse and docker mirror image distribute the important component as container service, undoubtedly influence the crucial ring of overall quality of service One of section.In enterprise and publicly-owned cloud service, the service object in docker mirror image warehouse generally it is thousands of to tens of thousands of magnitudes hereinafter, and Major part walks Intranet or special line carries out the distribution of docker mirror image, so bandwidth cost, distribution speed still receive.But with The development of container service, when docker mirror image warehouse need to support the docker mirror image of million gridblocks to distribute, and all nodes are located When in subscriber household network, distributes stability and cost is a severe technological challenge.By taking 100MB mirror image as an example, one The distribution of 1,000,000 nodes is completed in minute, needs the bandwidth cost of 1T or more.Therefore, existing docker mirror image distribution approach without Method meets the needs of magnanimity distribution container service.
Summary of the invention
In view of this, the present invention proposes a kind of docker mirror image distribution method and system, data gateway and computer-readable Storage medium, to solve at least one above-mentioned technical problem.
Firstly, to achieve the above object, the present invention proposes a kind of docker mirror image distribution method, it is applied to data gateway, The described method includes:
Receive the request for the acquisition docker image file that client is sent;
Signature check is carried out to the request;
After verification passes through, available data sharing node is inquired from the tracker server of P2P network;And
P2P is established with available data sharing node described at least one to connect, and downloads the docker image file, and The docker image file downloaded is sent to the client.
Optionally, the method also includes:
When inquiring available data sharing node from the tracker server less than preset quantity or being not present When, use back source mode to download docker image file from mirror image source station by CDN network.
Optionally, when the docker image file is more than default size, the docker image file is cut using small Piece is respectively stored in multiple data sharing nodes;
It is described to establish P2P with available data sharing node described at least one and connect, download the docker mirror image text Part includes: to establish P2P with multiple available data sharing nodes to connect, the text of docker mirror image described in multi-source parallel downloading Part.
In addition, to achieve the above object, the present invention also provides a kind of data gateway, the data gateway include memory, Processor is stored with the docker mirror image distributing programs that can be run on the processor, the docker on the memory Mirror image distributing programs realize following method when being executed by the processor:
Receive the request for the acquisition docker image file that client is sent;
Signature check is carried out to the request;
After verification passes through, available data sharing node is inquired from the tracker server of P2P network;And
P2P is established with available data sharing node described at least one to connect, and downloads the docker image file, and The docker image file downloaded is sent to the client.
Optionally, it is also realized when the docker mirror image distributing programs are executed by the processor:
When inquiring available data sharing node from the tracker server less than preset quantity or being not present When, use back source mode to download docker image file from mirror image source station by CDN network.
Optionally, when the docker image file is more than default size, the docker image file is cut using small Piece is respectively stored in multiple data sharing nodes;
It is described to establish P2P with available data sharing node described at least one and connect, download the docker mirror image text Part includes: to establish P2P with multiple available data sharing nodes to connect, the text of docker mirror image described in multi-source parallel downloading Part.
Further, to achieve the above object, the present invention also provides a kind of docker mirror image distributing and processing system, the systems System includes:
Receiving unit, the request of the acquisition docker image file for receiving client transmission;
Verification unit, for carrying out signature check to the request;
Query unit, for it is total to inquire available data from the tracker server of P2P network after verification passes through Enjoy node;
Download unit is connect, described in downloading for establishing P2P with available data sharing node described at least one Docker image file.
Further, to achieve the above object, the present invention also provides a kind of docker mirror image dissemination system, the system packets It includes:
Client, for sending the request for obtaining docker image file to local data gateway;
The data gateway, for carrying out signature check to the request after receiving the request;When verification passes through Afterwards, available data sharing node is inquired from the tracker server of P2P network, with available data described at least one Shared node establishes P2P connection, downloads the docker image file, and the docker image file downloaded is sent To the client.
Optionally, it is few that available data sharing node is inquired from the tracker server when the data gateway In preset quantity or in the absence of, be also used to use back source mode to download the docker mirror from mirror image source station by CDN network As file.
Optionally, the client is also used to report after downloading docker image file success by CDN network The docker image file information downloaded is into the tracker server, so that the tracker server is by the visitor Family end is recorded as an available data sharing node.
Optionally, the client is before sending the request for obtaining docker image file to the data gateway, also For according to docker mirror image index file information checking it is local whether the existing docker mirror image index file;
When the local existing docker mirror image index file, corresponding docker mirror image text directly is obtained from local Part;
When the docker mirror image index file is locally not present, then is sent to the data gateway and obtain docker mirror As the request of file.
Optionally, when the docker image file is more than default size, the docker image file is cut using small Piece is respectively stored in multiple data sharing nodes;
The data gateway is established P2P with available data sharing node described at least one and is connect, described in downloading Docker image file includes: to carry out multi-source from multiple data sharing nodes when downloading the docker image file Parallel downloading.
Further, to achieve the above object, the present invention also provides a kind of computer readable storage medium, the computers Readable storage medium storing program for executing is stored with docker mirror image distributing programs, and the docker mirror image distributing programs can be by least one processor It executes, so that at least one described processor executes such as above-mentioned docker mirror image distribution method.
Compared to the prior art, docker mirror image distribution method proposed by the invention and system, data gateway and calculating Machine readable storage medium storing program for executing can download docker image file by P2P network, greatly save bandwidth cost.
Detailed description of the invention
Fig. 1 is a kind of configuration diagram for docker mirror image dissemination system that first embodiment of the invention proposes;
Fig. 2 is a kind of flow diagram for docker mirror image distribution method that second embodiment of the invention proposes;
Fig. 3 is a kind of flow diagram for docker mirror image distribution method that third embodiment of the invention proposes;
Fig. 4 is a kind of configuration diagram for data gateway that fourth embodiment of the invention proposes;
Fig. 5 is a kind of flow diagram for docker mirror image distribution method that fifth embodiment of the invention proposes;
Fig. 6 is a kind of flow diagram for docker mirror image distribution method that sixth embodiment of the invention proposes;
Fig. 7 is a kind of module diagram for docker mirror image distributing and processing system that seventh embodiment of the invention proposes.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, not For limiting the present invention.Based on the embodiments of the present invention, those of ordinary skill in the art are not before making creative work Every other embodiment obtained is put, shall fall within the protection scope of the present invention.
It should be noted that the description for being related to " first ", " second " etc. in the present invention is used for description purposes only, and cannot It is interpreted as its relative importance of indication or suggestion or implicitly indicates the quantity of indicated technical characteristic.Define as a result, " the One ", the feature of " second " can explicitly or implicitly include at least one of the features.In addition, the skill between each embodiment Art scheme can be combined with each other, but must be based on can be realized by those of ordinary skill in the art, when technical solution Will be understood that the combination of this technical solution is not present in conjunction with there is conflicting or cannot achieve when, also not the present invention claims Protection scope within.
First embodiment
As shown in fig.1, first embodiment of the invention proposes a kind of docker mirror image dissemination system.
In the present embodiment, docker mirror image dissemination system 1 includes docker client 2 and data gateway 3, wherein number It is communicated to connect according to gateway 3 and tracker (tracking) server 4, data sharing node 5.
Docker client 2 is used for after receiving docker image file download instruction, is sent to local data gateway 3 Obtain the request of docker image file.Docker mirror image includes three class files: (1) mainfest file, i.e. mirror image index text Part saves the sha256 characteristic value of each layer layers and configuration file in mirror image;(2) imageconf file, i.e. mirror configuration text Part;(3) each layer layers of file of mirror image.In order to avoid repeated downloads, docker client 2 can be according to the docker mirror image text Mainfest the file information in part download instruction, verification it is local whether the existing mainfest file, when it is present can be with Directly acquire corresponding docker image file.When the mainfest file is locally not present, then sends and obtain to data gateway 3 The request of each layer layers of file of docker mirror image.
Data gateway 3 is used for after receiving the request, is carried out signature check to the request, is prevented docker mirror image File is illegally accessed.After verification passes through, the tracker server 4 into P2P network inquires available data sharing node 5 information.
Tracker server 4 is for recording all available 5 information of data sharing node in P2P network.
Data sharing node 5 is the smart machine being deployed under subscriber household network environment, such as sudden peal of thunder money-making is precious, object for appreciation visitor Cloud, Intelligent set top box etc., can the storage equipment such as external or built-in disk, docker service can be disposed on data sharing node 5, Service is externally provided in Iaas (Infrastructure as a Service, infrastructure service) form.Also, it is each Other than it can dispose docker service, the node being also used as in P2P network externally provides data sharing node 5 Docker image file distributes transfer function.
Data sharing node 5 can be the node in CDN network or the node in block chain network.
Above-mentioned data gateway 3, which is also used to establish P2P by udp hole punching and at least one available data sharing node 5, to be connected It connects, downloads docker image file, the docker image file downloaded then is sent to corresponding docker client 2.
Further, docker mirror image dissemination system 1 further includes mirror image warehouse 6 and mirror image source station 7.
Mirror image warehouse 6 is used to provide the clothes such as long-range subscription authentication, mirrored storage and mirror image inquiry for docker client 2 Business.Mirror image source station 7 is used to store docker image file by ad hoc rules, provides back for CDN network distribution and stands in a steady stream.
To be adapted to CDN and P2P net distribution, the docker image file being committed in mirror image warehouse 6 need to be led by rule Out to mirror image source station 7.Firstly, user is packaged docker image file by dockerfile or docker order production. Docker client 2 obtains user right list to mirror authentication server (not shown), and with JWT (Json Web Token) protocol form returns.Docker client 2 carries authority information layering and submits docker image file data to mirror image Warehouse 6.Then, the authority information of docker client 2 is verified in mirror image warehouse 6, is verified, and submitted docker is saved Image file data.Mirror image warehouse 6 has handled readjustment notice mirror image source station 7 after all docker image file data.Image source Stand 7 export this mirror image mainfest, imageconf and each layer layers of file, and is stored in this disk.Wherein own Docker image file does duplicate removal processing by sha256 characteristic value.
In the present embodiment, inquired from tracker server 4 when data gateway 3 available data sharing node 5 compared with Few (being less than preset quantity) or in the absence of, use back source mode literary from the downloading docker mirror image of mirror image source station 7 by CDN network Part.After downloading successfully (data are complete), which reports the docker image file information downloaded to arrive It is subsequent to remember the docker client 2 as an available data sharing node 5 in tracker server 4 Record.
In addition, after completion of the download, the sha256 that docker client 2 verifies downloaded docker image file is special Whether value indicative is legal.Wherein, the sha256 characteristic value of the docker image file can be calculated in the following manner: random 20 1M size file contents are extracted as sample then to calculate every offset in the sample content record file of extraction Then the sha256 value of one fragment is a sha256 to the sha256 value of all fragments and is calculated, generates the sha256 of this document Characteristic value.Same calculating is done according to document misregistration amount in docker client 2, verify this document sha256 characteristic value whether It coincide.If the sha256 characteristic value of the docker image file is legal, downloading successfully notice is returned, otherwise removes and has cached Downloading data and return to the notice of failed download.
Second embodiment
As shown in fig.2, second embodiment of the invention proposes a kind of docker mirror image distribution method, it is applied to above-mentioned Docker mirror image dissemination system 1.In the present embodiment, the execution of the step in flow chart shown in Fig. 2 according to different requirements, Sequence can change, and certain steps can be omitted.It, can be according to actually answering in addition, in relation to the shared Conventional processing steps calculated The present invention is included in scene.This method comprises:
S10, docker client 2 sends to local data gateway 3 according to docker image file download instruction and obtains The request of docker image file.
Docker mirror image includes three class files: (1) mainfest file, i.e. mirror image index file, is saved each in mirror image The sha256 characteristic value of layer layers and configuration file;(2) imageconf file, i.e. mirror configuration file;(3) mirror image is each Layer layers of file.In order to avoid repeated downloads, docker client 2 can be according in the docker image file download instruction Mainfest the file information, verification it is local whether the existing mainfest file, correspondence can be directly acquired when it is present Docker image file.It is each when the mainfest file is locally not present, then to the transmission acquisition docker mirror image of data gateway 3 The request of layer layers of file.
S11 after data gateway 3 receives the request, carries out signature check to the request.
The signature check can prevent docker image file to be illegally accessed.
S12, after verification passes through, data gateway 3 inquires available data sharing node letter from tracker server 4 Breath.
Record has all available 5 information of data sharing node in P2P network in tracker server 4.It is above-mentioned available Data sharing node 5, which refers to, can provide the data sharing node 5 of the distribution transfer function of the docker image file.
S13, data gateway 3 are established P2P at least one available data sharing node 5 by udp hole punching and are connect, under Docker image file is carried, the docker image file downloaded then is sent to corresponding docker client 2.
Compared to the mode in traditional direct access mirror image warehouse 6, docker client 2 need and local in the present embodiment The interaction of data gateway 3, data gateway 3 download docker image file directly from P2P network.
In the present embodiment, when docker image file is the big file more than default size, distinguished using small slice It is stored in multiple data sharing nodes 5, it is concurrent from the above-mentioned multiple progress of data sharing nodes 5 multi-sources when downloading the big file Downloading.
Further, after completion of the download, docker client 2 verifies downloaded docker image file Whether sha256 characteristic value is legal.Wherein, the sha256 characteristic value of the docker image file can carry out in the following manner It calculates: extracting 20 1M size file contents at random as sample, to the offset in the sample content record file of extraction, so The sha256 value of each fragment is calculated afterwards, and a sha256 then is done to the sha256 value of all fragments and is calculated, this document is generated Sha256 characteristic value.Same calculating is done according to document misregistration amount in docker client 2, the sha256 for verifying this document is special Whether value indicative coincide.If the sha256 characteristic value of the docker image file is legal, downloading successfully notice is returned to, otherwise clearly Except the downloading data cached and the notice for returning to failed download.
Docker mirror image distribution method provided in this embodiment can download docker image file, pole by P2P network Big saving bandwidth cost.Slice storage will do it to big file in P2P distribution mode, different data sharing nodes 5 stores Different fragments can carry out multi-source parallel downloading when downloading docker image file, so that distribution efficiency is more efficient.In addition, straight Even in the distribution mode in mirror image warehouse 6, every layer of file requires to carry out authorization check, and under big concurrent scene, authentication service is held Easily become bottleneck.But under P2P distribution mode, each docker image file fragment encryption, even if leakage can not also have been got Whole docker image file, so without having to worry about authorization check in distribution procedure.
3rd embodiment
As shown in fig.3, third embodiment of the invention proposes a kind of docker mirror image distribution method.In the present embodiment, The execution sequence of the step in flow chart shown in Fig. 3 can change according to different requirements, and certain steps can be omitted.This In embodiment, the S20-S22 in the docker mirror image distribution method is similar with the S10-S12 of above-mentioned second embodiment, difference It is that this method further includes S23.
S20, docker client 2 sends to local data gateway 3 according to docker image file download instruction and obtains The request of docker image file.
Docker mirror image includes three class files: (1) mainfest file, i.e. mirror image index file, is saved each in mirror image The sha256 characteristic value of layer layers and configuration file;(2) imageconf file, i.e. mirror configuration file;(3) mirror image is each Layer layers of file.In order to avoid repeated downloads, docker client 2 can be according in the docker image file download instruction Mainfest the file information, verification it is local whether the existing mainfest file, correspondence can be directly acquired when it is present Docker image file.It is each when the mainfest file is locally not present, then to the transmission acquisition docker mirror image of data gateway 3 The request of layer layers of file.
S21 after data gateway 3 receives the request, carries out signature check to the request.
The signature check can prevent docker image file to be illegally accessed.
S22, after verification passes through, data gateway 3 inquires available data sharing node letter from tracker server 4 Breath.
Record has all available 5 information of data sharing node in P2P network in tracker server 4.It is above-mentioned available Data sharing node 5, which refers to, can provide the data sharing node 5 of the distribution transfer function of the docker image file.
S23, when data gateway 3 inquires available data sharing node 5 less than present count from tracker server 4 Amount or in the absence of, use back source mode from the downloading of mirror image source station 7 docker image file by CDN network, then will be under The docker image file of load is sent to corresponding docker client 2.
After downloading successfully (data are complete) by CDN network, which reports the docker mirror downloaded Picture the file information is subsequent to regard the docker client 2 as an available data sharing into tracker server 4 Node 5 is recorded, for providing the distribution function of the docker image file for other clients.
In addition, after completion of the download, the sha256 that docker client 2 verifies downloaded docker image file is special Whether value indicative is legal.Wherein, the sha256 characteristic value of the docker image file can be calculated in the following manner: random 20 1M size file contents are extracted as sample then to calculate every offset in the sample content record file of extraction Then the sha256 value of one fragment is a sha256 to the sha256 value of all fragments and is calculated, generates the sha256 of this document Characteristic value.Same calculating is done according to document misregistration amount in docker client 2, verify this document sha256 characteristic value whether It coincide.If the sha256 characteristic value of the docker image file is legal, downloading successfully notice is returned, otherwise removes and has cached Downloading data and return to the notice of failed download.
Docker mirror image distribution method provided in this embodiment can not download the docker mirror image in P2P network It when file, is downloaded by CDN network, the docker client 2 becomes available data sharing node 5 after downloading successfully. Therefore, with the increasing of deployment amount, the amount of available data sharing node 5 is also increasing, and bandwidth cost will not increase with deployment amount Add and sustainable growth.
Fourth embodiment
As shown in fig.4, fourth embodiment of the invention proposes a kind of data gateway 3.
In the present embodiment, the data gateway 3 includes: memory 11, processor 13, network interface 15 and communication bus 17.Wherein, network interface 15 optionally may include standard wireline interface and wireless interface (such as WI-FI interface).Communication bus 17 for realizing the connection communication between these components.
Memory 11 includes at least a type of readable storage medium storing program for executing.The readable storage medium storing program for executing of above-mentioned at least one type It can be the non-volatile memory medium of such as flash memory, hard disk, multimedia card, card-type memory.In some embodiments, above-mentioned to deposit Reservoir 11 can be the internal storage unit of data gateway 3, such as the hard disk of the data gateway 3.In further embodiments, on State the plug-in type hard disk being equipped on the external memory unit that memory 11 is also possible to data gateway 3, such as data gateway 3, intelligence Energy storage card (Smart MediaCard, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..
Above-mentioned memory 11 can be used for storing the application software and Various types of data for being installed on data gateway 3, such as The related data generated in the program code and its operational process of docker mirror image distributing programs 100.
Processor 13 can be a central processing unit, microprocessor or other data processing chips in some embodiments, Program code or processing data for being stored in run memory 11.
Fig. 4 illustrates only the data gateway 3 with component 11-17 and docker mirror image distributing programs 100, but should manage Solution, Fig. 4 do not show that all components of data gateway 3, can substitute and implement more or less component.
In 3 embodiment of data gateway shown in Fig. 4, as being stored in a kind of memory 11 of computer storage medium The program code of docker mirror image distributing programs 100, processor 13 execute the program generation of above-mentioned docker mirror image distributing programs 100 When code, following method is realized:
(1) the acquisition docker mirror image text that docker client 2 is sent according to docker image file download instruction is received The request of part.
(2) signature check is carried out to the request.
(3) after verification passes through, available data sharing nodal information is inquired from tracker server 4.
(4) P2P is established at least one available data sharing node 5 by udp hole punching to connect, download docker mirror As file.
(5) when inquiring available data sharing node 5 from tracker server 4 less than preset quantity or being not present When, use back source mode to download docker image file from mirror image source station 7 by CDN network.
(6) the docker image file downloaded is sent to corresponding docker client 2.
The detailed description of the above method please refers to above-mentioned first to 3rd embodiment, and details are not described herein.
5th embodiment
As shown in fig.5, fifth embodiment of the invention proposes a kind of docker mirror image distribution method, it is applied to above-mentioned data Gateway 3.In the present embodiment, the execution sequence of the step in flow chart shown in fig. 5 can change according to different requirements, Certain steps can be omitted.In addition, in relation to the shared Conventional processing steps calculated this hair can be included according to practical application scene It is bright.This method comprises:
S30 receives the acquisition docker mirror image text that docker client 2 is sent according to docker image file download instruction The request of part.
S31 carries out signature check to the request.
S32 inquires available data sharing nodal information after verification passes through from tracker server 4.
S33 establishes P2P at least one available data sharing node 5 by udp hole punching and connect, and downloads docker mirror As file, the docker image file downloaded then is sent to corresponding docker client 2.
The detailed description of above-mentioned steps please refers to above-mentioned first to 3rd embodiment, and details are not described herein.
Sixth embodiment
As shown in fig.6, sixth embodiment of the invention proposes a kind of docker mirror image distribution method.In the present embodiment, The execution sequence of the step in flow chart shown in fig. 6 can change according to different requirements, and certain steps can be omitted.This In embodiment, the S40-S42 in the docker mirror image distribution method is similar with the S30-S32 of above-mentioned 5th embodiment, difference It is that this method further includes S44.
S40 receives the acquisition docker mirror image text that docker client 2 is sent according to docker image file download instruction The request of part.
S41 carries out signature check to the request.
S42 inquires available data sharing nodal information after verification passes through from tracker server 4.
S44, when inquiring available data sharing node 5 from tracker server 4 less than preset quantity or being not present When, use back source mode to download docker image file, the docker that then will have been downloaded from mirror image source station 7 by CDN network Image file is sent to corresponding docker client 2.
The detailed description of above-mentioned steps please refers to above-mentioned first to 3rd embodiment, and details are not described herein.
7th embodiment
As shown in fig.7, sixth embodiment of the invention proposes a kind of docker mirror image distributing and processing system 60, it is applied to upper State data gateway 3.
In the present embodiment, docker mirror image distributing and processing system 60 includes receiving unit 602, the inquiry of verification unit 604 Unit 606 and download unit 608.
Receiving unit 602, the acquisition sent for receiving docker client 2 according to docker image file download instruction The request of docker image file.
Verification unit 604, for carrying out signature check to the request.
Query unit 606, for inquiring available data sharing node from tracker server 4 after verification passes through Information.
Download unit 608 is connect for establishing P2P at least one available data sharing node 5 by udp hole punching, Download docker image file.It is also used to work as and inquires available data sharing node 5 from tracker server 4 less than pre- If quantity or in the absence of, by CDN network use back source mode from mirror image source station 7 download docker image file.
The concrete function explanation of above-mentioned each unit please refers to the above-mentioned first to the 5th embodiment, and details are not described herein.
8th embodiment
The present invention also provides another embodiments, that is, provide a kind of computer readable storage medium, above-mentioned computer Readable storage medium storing program for executing is stored with docker mirror image distributing programs 100, and above-mentioned docker mirror image distributing programs 100 can be by least one Processor executes, so that at least one above-mentioned processor executes such as above-mentioned docker mirror image distribution method.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a client (can be mobile phone, computer, electronics Device, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (13)

1. a kind of docker mirror image distribution method is applied to data gateway, which is characterized in that the described method includes:
Receive the request for the acquisition docker image file that client is sent;
Signature check is carried out to the request;
After verification passes through, available data sharing node is inquired from the tracker server of P2P network;And
P2P is established with available data sharing node described at least one to connect, and downloads the docker image file, and will The docker image file of downloading is sent to the client.
2. docker mirror image distribution method as described in claim 1, which is characterized in that the method also includes:
When from inquired in the tracker server available data sharing node less than preset quantity or in the absence of, lead to Crossing CDN network uses back source mode to download docker image file from mirror image source station.
3. docker mirror image distribution method as described in claim 1, which is characterized in that
When the docker image file is more than default size, the docker image file is respectively stored in using small slice In multiple data sharing nodes;
It is described to establish P2P with available data sharing node described at least one and connect, download the docker image file packet It includes: establishing P2P with multiple available data sharing nodes and connect, docker image file described in multi-source parallel downloading.
4. a kind of data gateway, the data gateway includes memory, processor, and being stored on the memory can be at the place The docker mirror image distributing programs run on reason device, are realized such as when the docker mirror image distributing programs are executed by the processor Lower method:
Receive the request for the acquisition docker image file that client is sent;
Signature check is carried out to the request;
After verification passes through, available data sharing node is inquired from the tracker server of P2P network;And
P2P is established with available data sharing node described at least one to connect, and downloads the docker image file, and will The docker image file of downloading is sent to the client.
5. data gateway as claimed in claim 4, which is characterized in that the docker mirror image distributing programs are by the processor It is also realized when execution:
When from inquired in the tracker server available data sharing node less than preset quantity or in the absence of, lead to Crossing CDN network uses back source mode to download docker image file from mirror image source station.
6. data gateway as claimed in claim 4, it is characterised in that:
When the docker image file is more than default size, the docker image file is respectively stored in using small slice In multiple data sharing nodes;
It is described to establish P2P with available data sharing node described at least one and connect, download the docker image file packet It includes: establishing P2P with multiple available data sharing nodes and connect, docker image file described in multi-source parallel downloading.
7. a kind of docker mirror image distributing and processing system, which is characterized in that the system comprises:
Receiving unit, the request of the acquisition docker image file for receiving client transmission;
Verification unit, for carrying out signature check to the request;
Query unit, for inquiring available data sharing section from the tracker server of P2P network after verification passes through Point;
Download unit connect for establishing P2P with available data sharing node described at least one, downloads the docker mirror As file.
8. a kind of docker mirror image dissemination system, which is characterized in that the system comprises:
Client, for sending the request for obtaining docker image file to local data gateway;
The data gateway, for carrying out signature check to the request after receiving the request;After verification passes through, Available data sharing node is inquired from the tracker server of P2P network, with available data sharing described at least one Node establishes P2P connection, downloads the docker image file, and the docker image file downloaded is sent to institute State client.
9. docker mirror image dissemination system as claimed in claim 8, it is characterised in that:
When the data gateway inquired from the tracker server available data sharing node less than preset quantity or In the absence of, it is also used to that source mode is used back to download the docker image file from mirror image source station by CDN network.
10. docker mirror image dissemination system as claimed in claim 9, it is characterised in that:
The client is also used to report and downloaded after downloading docker image file success by CDN network Docker image file information into the tracker server so that the tracker server using the client as One available data sharing node is recorded.
11. such as the described in any item docker mirror image dissemination systems of claim 8-10, it is characterised in that:
The client is also used to basis before sending the request for obtaining docker image file to the data gateway Docker mirror image index file information checking it is local whether the existing docker mirror image index file;
When the local existing docker mirror image index file, corresponding docker image file directly is obtained from local;
When the docker mirror image index file is locally not present, then is sent to the data gateway and obtain docker mirror image text The request of part.
12. docker mirror image dissemination system as claimed in claim 8, which is characterized in that when the docker image file is super When crossing default size, the docker image file is respectively stored in multiple data sharing nodes using small slice;
The data gateway is established P2P with available data sharing node described at least one and is connect, and the docker mirror is downloaded As file includes: to carry out multi-source from multiple data sharing nodes when downloading the docker image file and give It carries.
13. a kind of computer readable storage medium, the computer-readable recording medium storage has docker mirror image distributing programs, The docker mirror image distributing programs can be executed by least one processor, so that at least one described processor executes such as right It is required that docker mirror image distribution method described in any one of 1-3.
CN201811185125.0A 2018-10-11 2018-10-11 Docker mirror image distribution method, system, data gateway and computer readable storage medium Pending CN109491758A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811185125.0A CN109491758A (en) 2018-10-11 2018-10-11 Docker mirror image distribution method, system, data gateway and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811185125.0A CN109491758A (en) 2018-10-11 2018-10-11 Docker mirror image distribution method, system, data gateway and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN109491758A true CN109491758A (en) 2019-03-19

Family

ID=65689724

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811185125.0A Pending CN109491758A (en) 2018-10-11 2018-10-11 Docker mirror image distribution method, system, data gateway and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109491758A (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110445709A (en) * 2019-09-11 2019-11-12 成都千立网络科技有限公司 Carry the intelligent gateway of docker application
CN110740192A (en) * 2019-10-29 2020-01-31 西安雷风电子科技有限公司 mirror image distribution method and system in P2P network-based virtualization environment
CN111538566A (en) * 2020-04-24 2020-08-14 咪咕文化科技有限公司 Mirror image file processing method, device and system, electronic equipment and storage medium
CN111787116A (en) * 2020-07-07 2020-10-16 上海道客网络科技有限公司 System and method for trusted authentication of container mirror image based on block chain technology
CN112540776A (en) * 2020-12-25 2021-03-23 麒麟软件有限公司 Operating system image management method based on ISO9660 image slicing duplicate removal technology
CN112631797A (en) * 2020-12-18 2021-04-09 京东数字科技控股股份有限公司 Method and device for configuring service system
CN112671871A (en) * 2020-12-17 2021-04-16 华人运通(上海)云计算科技有限公司 Mirror image distribution method and device, terminal equipment and storage medium
CN112883006A (en) * 2021-03-12 2021-06-01 云知声智能科技股份有限公司 Enterprise-level container mirror image acceleration method and device, electronic equipment and storage medium
CN113760453A (en) * 2021-08-04 2021-12-07 南方电网科学研究院有限责任公司 Container mirror image distribution system and container mirror image pushing, pulling and deleting method
CN113779353A (en) * 2021-07-30 2021-12-10 中国铁道科学研究院集团有限公司电子计算技术研究所 High-speed railway space-time big data analysis service engine system and method
CN113824750A (en) * 2020-06-19 2021-12-21 网宿科技股份有限公司 Data transmission method and data transmission system
CN114301682A (en) * 2021-12-28 2022-04-08 建信金融科技有限责任公司 Data processing method and device and terminal equipment
CN114924845A (en) * 2022-07-21 2022-08-19 合肥中科类脑智能技术有限公司 Mirror image delay loading method and system suitable for edge AI scene
CN116095092A (en) * 2023-04-11 2023-05-09 湖南快乐阳光互动娱乐传媒有限公司 Peer node selection method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102624884A (en) * 2012-02-29 2012-08-01 上海聚力传媒技术有限公司 Method, device and facility for receiving peer-to-peer (P2P) resources
CN102833293A (en) * 2011-06-17 2012-12-19 腾讯科技(深圳)有限公司 Method for downloading resources in peer to server and peer (P2SP) network, and client
US20150256481A1 (en) * 2014-03-06 2015-09-10 Jisto Inc. Elastic Compute Cloud Based On Underutilized Server Resources Using A Distributed Container System
CN108322496A (en) * 2017-01-17 2018-07-24 北京京东尚科信息技术有限公司 Image file distribution method and system, computer readable storage medium, electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102833293A (en) * 2011-06-17 2012-12-19 腾讯科技(深圳)有限公司 Method for downloading resources in peer to server and peer (P2SP) network, and client
CN102624884A (en) * 2012-02-29 2012-08-01 上海聚力传媒技术有限公司 Method, device and facility for receiving peer-to-peer (P2P) resources
US20150256481A1 (en) * 2014-03-06 2015-09-10 Jisto Inc. Elastic Compute Cloud Based On Underutilized Server Resources Using A Distributed Container System
CN108322496A (en) * 2017-01-17 2018-07-24 北京京东尚科信息技术有限公司 Image file distribution method and system, computer readable storage medium, electronic equipment

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110445709A (en) * 2019-09-11 2019-11-12 成都千立网络科技有限公司 Carry the intelligent gateway of docker application
CN110740192A (en) * 2019-10-29 2020-01-31 西安雷风电子科技有限公司 mirror image distribution method and system in P2P network-based virtualization environment
CN111538566A (en) * 2020-04-24 2020-08-14 咪咕文化科技有限公司 Mirror image file processing method, device and system, electronic equipment and storage medium
CN113824750A (en) * 2020-06-19 2021-12-21 网宿科技股份有限公司 Data transmission method and data transmission system
CN113824750B (en) * 2020-06-19 2023-04-18 网宿科技股份有限公司 Data transmission method and data transmission system
CN111787116A (en) * 2020-07-07 2020-10-16 上海道客网络科技有限公司 System and method for trusted authentication of container mirror image based on block chain technology
CN112671871B (en) * 2020-12-17 2023-09-15 华人运通(上海)云计算科技有限公司 Mirror image distribution method and device, terminal equipment and storage medium
CN112671871A (en) * 2020-12-17 2021-04-16 华人运通(上海)云计算科技有限公司 Mirror image distribution method and device, terminal equipment and storage medium
CN112631797A (en) * 2020-12-18 2021-04-09 京东数字科技控股股份有限公司 Method and device for configuring service system
WO2022134324A1 (en) * 2020-12-25 2022-06-30 麒麟软件有限公司 Operating system mirror management method based on iso9660 mirror slice deduplication technology
CN112540776A (en) * 2020-12-25 2021-03-23 麒麟软件有限公司 Operating system image management method based on ISO9660 image slicing duplicate removal technology
CN112883006A (en) * 2021-03-12 2021-06-01 云知声智能科技股份有限公司 Enterprise-level container mirror image acceleration method and device, electronic equipment and storage medium
CN113779353A (en) * 2021-07-30 2021-12-10 中国铁道科学研究院集团有限公司电子计算技术研究所 High-speed railway space-time big data analysis service engine system and method
CN113779353B (en) * 2021-07-30 2023-11-17 中国铁道科学研究院集团有限公司电子计算技术研究所 High-speed railway space-time big data analysis service engine system and method
CN113760453A (en) * 2021-08-04 2021-12-07 南方电网科学研究院有限责任公司 Container mirror image distribution system and container mirror image pushing, pulling and deleting method
CN114301682A (en) * 2021-12-28 2022-04-08 建信金融科技有限责任公司 Data processing method and device and terminal equipment
CN114301682B (en) * 2021-12-28 2023-05-26 建信金融科技有限责任公司 Data processing method, device and terminal equipment
CN114924845A (en) * 2022-07-21 2022-08-19 合肥中科类脑智能技术有限公司 Mirror image delay loading method and system suitable for edge AI scene
CN116095092A (en) * 2023-04-11 2023-05-09 湖南快乐阳光互动娱乐传媒有限公司 Peer node selection method and device
CN116095092B (en) * 2023-04-11 2023-06-23 湖南快乐阳光互动娱乐传媒有限公司 Peer node selection method and device

Similar Documents

Publication Publication Date Title
CN109491758A (en) Docker mirror image distribution method, system, data gateway and computer readable storage medium
CN109522735B (en) Data permission verification method and device based on intelligent contract
CN101409706B (en) Method, system and relevant equipment for distributing data of edge network
CN103873505B (en) Method, system and the device uploaded offline to cloud storage service device
US20140280859A1 (en) Sharing control system and method for network resources download information
CN103475682B (en) File transfer method and file transfer equipment
CN109688222A (en) The dispatching method of shared computing resource, shared computing system, server and storage medium
CN106559392A (en) A kind of file sharing method, device and system
CN101442558B (en) Method and system for providing index service for P2SP network
CN102882985A (en) File sharing method based on cloud storage
CN109088909B (en) Service gray level publishing method and device based on merchant type
CN105302920A (en) Optimal management method and system for cloud storage data
CN103731487A (en) Download method, device, system and router for resource file
EP2778968B1 (en) Mobile telecommunication device remote access to cloud-based or virtualized database systems
CN109565518A (en) Interchangeable content retrieval
CN106713391A (en) Session information sharing method and sharing system
CN103369002B (en) A kind of method and system of resource downloading
CN106131113A (en) A kind of resource downloading method, device, system and Resource Server
CN107580021A (en) A kind of method and apparatus of file transmission
CN109962961A (en) A kind of reorientation method and system of content distribution network CDN service node
CN116991936A (en) Block chain-based rights and interests credential management method, apparatus, electronic device and medium
CN108563697A (en) A kind of data processing method, device and storage medium
CN108134824A (en) A kind of travel products running log recording method and system
US20220067125A1 (en) Method for distributing certificate of right to use digital content, and computer program stored in medium in order to carry out method
CN103416027B (en) The system of the method, buffer and cache optimization of cache optimization

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: 20190319

RJ01 Rejection of invention patent application after publication