CN104899068A - Method and device for multi-process start by container - Google Patents

Method and device for multi-process start by container Download PDF

Info

Publication number
CN104899068A
CN104899068A CN201510374010.6A CN201510374010A CN104899068A CN 104899068 A CN104899068 A CN 104899068A CN 201510374010 A CN201510374010 A CN 201510374010A CN 104899068 A CN104899068 A CN 104899068A
Authority
CN
China
Prior art keywords
container
script file
mirror image
predetermined directory
loading
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
CN201510374010.6A
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.)
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201510374010.6A priority Critical patent/CN104899068A/en
Publication of CN104899068A publication Critical patent/CN104899068A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a method and a device for multi-process start by a container, relates to the technical field of web platforms and mainly aims to solve the problem that multiple containers need to be used in a service execution process to lead to resource waste due to the fact that a container often permits running of one process, but support of multiple processes is needed when one service is executed. The technical scheme mainly includes that the method includes setting a default directory for a container process control, wherein the container process control can achieve calling of multiple subprocesses by calling a target process; loading a script file in the default directory to obtain a container mirror image, wherein the script file contains necessary function applications of a to-be-started service item, and the function applications need to be executed and completed by the processes when running; running the container mirror image to start the subprocesses. The method and the device are mainly applied to a process that a Linux system uses the container for multi-process start.

Description

Container is used to carry out method and the device of multi-process startup
Technical field
The present invention relates to web platform technology field, particularly relate to a kind of use container to carry out multi-process startup method and device.
Background technology
In order to save hardware resource, Intel Virtualization Technology is more and more approved and is used.Intel Virtualization Technology is a kind of resource management techniques, is by the various actual resources of computing machine, as server, give abstract, conversion after present, break indivisible obstacle between physical mechanism.At present, in order to save server resource, by Xen Intel Virtualization Technology, one station server is fictionalized multiple servers, share between the multiple servers fictionalized and comprise the complete system image of of kernel, a server can allow multiple process to run, to meet the application demand of different business simultaneously simultaneously.When by Xen Intel Virtualization Technology virtual server, need to build a virtualization layer in property server, based on the virtual multiple server of virtualization layer, ensure that the isolation of running space between virtual multiple servers, but, due to the structure of virtualization layer, cause virtual server and system kernel not to be directly carry out alternately, therefore, the performance of virtual server is made can not to meet more demands of different business.
In order to solve the problem, different business on server can be separated in container, the structure of container is without the need to building virtualization layer, the running space of isolation just can be provided, namely an entire run space exclusively enjoyed is comprised in each container, container after structure directly can carry out alternately with system kernel, improves the treatment effeciency of the hardware resources such as central processing unit (Central Processing Unit, CPU), internal memory.But container once often allows operation process, and perform the support that a business often needs multiple process, thus cause needing to use in process of service execution multiple container, cause the waste of resource.
Summary of the invention
In view of this, provided by the invention a kind of use container to carry out multi-process startup method and device, fundamental purpose is that solving container once often allows operation process, and perform the support that a business often needs multiple process, thus cause needing to use multiple container in process of service execution, cause the problem of the waste of resource.
According to one aspect of the invention, the invention provides a kind of method using container to carry out multi-process startup, comprising:
Arrange predetermined directory to container process control, described container process control can realize calling of multiple subprocess by calling a target process;
Load the script file in described predetermined directory, obtain container mirror image, described script file comprises the necessary function application of service entry to be launched, and described function application operationally needs by multiple process complete;
Run described container mirror image, to start described multiple subprocess.
According to another aspect of the present invention, the invention provides a kind of device using container to carry out multi-process startup, comprising:
Setting unit, for arranging predetermined directory to container process control, described container process control can realize calling of multiple subprocess by calling a target process;
Loading unit, for loading the script file in the described predetermined directory of described setting unit setting, described script file comprises the necessary function application of service entry to be launched, and described function application operationally needs by multiple process complete;
Acquiring unit, after loading the script file in described predetermined directory at described loading unit, obtains container mirror image;
Running unit, for running the described container mirror image that described acquiring unit obtains, to start described multiple subprocess.
By technique scheme, use container provided by the invention carries out method and the device of multi-process startup, first predetermined directory is set in container process control, load the script file in predetermined directory, obtain container mirror image, because container process control can realize calling of multiple subprocess by calling a target process, container process control and script file are carried out " binding ", the function comprised in script file can be applied multiple processes of operationally needing subprocess as container process control invocation target process in the present invention, therefore, when container mirror image runs, realize use container and start multiple process.
Above-mentioned explanation is only the general introduction of technical solution of the present invention, in order to technological means of the present invention can be better understood, and can be implemented according to the content of instructions, and can become apparent, below especially exemplified by the specific embodiment of the present invention to allow above and other objects of the present invention, feature and advantage.
Accompanying drawing explanation
By reading hereafter detailed description of the preferred embodiment, various other advantage and benefit will become cheer and bright for those of ordinary skill in the art.Accompanying drawing only for illustrating the object of preferred implementation, and does not think limitation of the present invention.And in whole accompanying drawing, represent identical parts by identical reference symbol.In the accompanying drawings:
Fig. 1 shows a kind of process flow diagram using container to carry out the method for multi-process startup that the embodiment of the present invention provides;
Fig. 2 shows a kind of composition frame chart using container to carry out the device of multi-process startup that the embodiment of the present invention provides;
The another kind that Fig. 3 shows the embodiment of the present invention to be provided uses container to carry out the composition frame chart of the device of multi-process startup;
The another kind that Fig. 4 shows the embodiment of the present invention to be provided uses container to carry out the composition frame chart of the device of multi-process startup.
Embodiment
Below with reference to accompanying drawings exemplary embodiment of the present disclosure is described in more detail.Although show exemplary embodiment of the present disclosure in accompanying drawing, however should be appreciated that can realize the disclosure in a variety of manners and not should limit by the embodiment set forth here.On the contrary, provide these embodiments to be in order to more thoroughly the disclosure can be understood, and complete for the scope of the present disclosure can be conveyed to those skilled in the art.
Embodiments provide a kind of method using container to carry out multi-process startup, as shown in Figure 1, the method comprises:
101, predetermined directory is arranged to container process control.
In the embodiment of the present invention, container process control acquires from the container of other types, but due to when developing container process control, often use different programming languages, thus the environment for use of container process control be there are differences, the function services in a kind of container may be caused can not to be applied directly in other container, therefore, when running the container process control obtained from the container of other types in the container that the embodiment of the present invention uses, this container process control to obtaining is needed to carry out adaptation, generation can be applicable in the container described in the embodiment of the present invention, this container process control after adaptation has the service of calling realizing multiple subprocess by calling a target process.
Predetermined directory is arranged to container process control, wherein, this predetermined directory is a self-defining directory information, the object that the embodiment of the present invention arranges predetermined directory is, when container process control is when calling a target process, can start by the execution of predetermined directory multiple subprocesss that this target process calls.
102, load the script file in predetermined directory, obtain container mirror image.
Script file comprises the necessary function application of service entry to be launched, and function application operationally needs by multiple process complete.It should be noted that, only comprise the necessary function application of service entry to be launched in this script file, and do not comprise the nonessential function application of service entry to be launched, in successive container operationally, avoid and start the nonessential function application of service entry to be launched, save resource.In embodiments of the present invention, also can function nonessential for service entry to be launched application be added in script file, in the embodiment of the present invention, the concrete function application comprised in script file not limited.
In the embodiment of the present invention, service entry to be launched can including, but not limited to following content, and such as, service entry to be launched is start service, shutdown service; Or automatically start certain application program service etc.Concrete, the content of the embodiment of the present invention to service entry to be launched does not limit.
Script file is loaded in the container process control in step 101 in predetermined directory, generates container mirror image.Predetermined directory is as the transit point between process control and script file, script file and container process control are bound, and the subprocess that the process that the function in script file being applied operationally needs is called as container process control, realizes running multiple process in a container simultaneously.
103, container mirror image is run, to start multiple subprocess.
When container mirror image operationally, first container process control is started, the process pid1 that the target process that container process control calls automatically performs when being container startup, the subprocess that the process that the process pid1 function called in predetermined directory is applied operationally to be needed is called as container process control, just completes the service entry to be launched starting in a container and need to be supported by multiple process thus.
The use container that the embodiment of the present invention provides carries out the method for multi-process startup, first predetermined directory is set in container process control, load the script file in predetermined directory, obtain container mirror image, because container process control can realize calling of multiple subprocess by calling a target process, container process control and script file are carried out " binding ", the function comprised in script file can be applied multiple processes of operationally needing subprocess as container process control invocation target process in the embodiment of the present invention, therefore, when container mirror image runs, realize use container and start multiple process.
Further, when loading the script file in predetermined directory, can adopt but be not limited to following mode and realize.
Mode one: record script file in described predetermined directory, directly loads the script file recorded in predetermined directory.
To comprise the applicable script file of the necessary merit of service entry to be launched is recorded in predetermined directory, predetermined directory is when recording script file, record can be carried out according to dissimilar service entry to be launched, also can according to the Booting sequence record script file of service entry to be launched.It should be noted that, when being loaded the script file in predetermined directory by this kind of mode, predetermined directory is merely able to load the script file recorded in predetermined directory, lacks certain dirigibility when loading the script file in predetermined directory.
Mode two: record the call instruction for invoke script file in described predetermined directory, load this call instruction, calls execution loading scripts file to start call instruction.
In order to the script file in predetermined directory can be loaded flexibly, can described in pass-through mode two by loading call instruction, perform loading scripts file.This call instruction is only for starting execution script file, and when its essence is that container mirror image runs, transfer to call instruction by starting the control authority performing script file, this call instruction is an enforceability script.Exemplary, suppose, 5 kinds of service entrys to be launched are comprised in script file, service entry 1 to be launched, service entry to be launched 2, service entry to be launched 3, service entry to be launched 4, service entry to be launched 5, the function application that these 5 kinds service entrys to be launched are corresponding different respectively, container loads call instruction, selects the service entry to be launched of the one in above-mentioned script file to load, realizes starting multiple process by call instruction.It should be noted that, can be configured according to the actual demand of user to the service entry to be launched in script file, call instruction can arbitrary service entry to be launched in booting script file flexibly.
Further, the target process described in the embodiment of the present invention possesses the function calling and control other subprocesss, and other subprocess does not possess the function calling and control other subprocesss.Exemplary, suppose, target process is pid1, this pid1 calls and subprocess under controlling comprises pid2, pid3, pid4, pid5, pid6, pid7, pid8, in the method that the embodiment of the present invention provides, pid1 can control pid2, pid3, pid4, pid5, pid6, pid7, the unlatching of pid8 or closedown, and pid2 does not possess unlatching or close pid1, pid3, pid4, pid5, pid6, pid7, the controlling functions of any one subprocess in pid8, in like manner, pid3 does not possess unlatching yet or closes pid1, pid2, pid4, pid5, pid6, pid7, the controlling functions of any one subprocess in pid8.Concrete, the information such as number, title of the embodiment of the present invention to target process and the lower subprocess of control thereof does not limit.
Further, after operation container mirror image, container to target process sending controling instruction, to control closedown or the unlatching of multiple subprocess.In the specific implementation, when container mirror image runs, the operating personnel of computing machine send the steering order of one or more subprocess closed or open under target process control to target process, such as, send the start steering order of promoter process 3 to this target process, send the start steering order of promoter process 2, promoter process 6 to this target process; Or, send to target process and stop the kill steering order of subprocess 5, the start steering order of promoter process 4.The embodiment of the present invention does not specifically limit to the content of target process invention steering order, number.
Further, after operation container mirror image, the response signal that container reception target process sends, this response signal is for recording the current closed condition of multiple subprocess or opening.In a kind of implementation of the embodiment of the present invention, when target process receives himself current closed condition or the opening of subprocess transmission, and to subprocess himself current closed condition or opening that container transmission and reception are arrived in preset time.Exemplary, when subprocess 1 receives the kill steering order of target process transmission, subprocess 1 feeds back to target process the kill steering order that has been finished immediately, and subprocess 1 is current is in closed condition, after target process receives the response signal of subprocess 1 transmission, in preset time, send the response signal of subprocess 1 transmission to container, closed condition or the opening of subprocess 1 can be got with Bedpan.Wherein, described preset time is the artificial time parameter arranged, and in order to ensure that container can get closed condition or the opening information of the subprocess under target process control in time, it is oversize that this preset time can not be arranged, and such as, can be set to 80ms; Or, can 20ms etc. be set to.Concrete, the set-up mode specific implementation process of the embodiment of the present invention to preset time does not limit.
In the another kind of implementation of the embodiment of the present invention, during the response signal that container reception target process sends, target process timing can also be adopted to send the current closed condition of subprocess or opening to container.Exemplary, all subprocess timings under target process controls send himself current closed condition or opening to target process, target process receive all subprocesss send current closed condition or opening after, send the response signal of all subprocesss to container, closed condition or the opening of all subprocesss can be got with Bedpan.In order to save container resource, container only can obtain the response message of specified portions subprocess, the timing of specified portions subprocess sends himself current closed condition or opening to target process, target process sends the response signal of specified portions subprocess after receiving the current closed condition or opening that specified portions subprocess sends to container.Subprocess timing to target process send himself current closed condition or opening, need by timing the time interval arrange very little, guarantee that container can obtain the current closed condition of subprocess or opening timely.The embodiment of the present invention did not limit the concrete opportunity receiving target process transmission response signal.
Further, run container mirror image can realize starting multiple process in a container.Computing machine can not run newly-generated container mirror image immediately in the process run, and needs the operation by presetting could run newly-generated container mirror image.When running container mirror image, can adopt but be not limited to following implementation, in a kind of implementation of the embodiment of the present invention, container mirror image is run by the mode sending start-up operation instruction, after generation container mirror image, send start operational order and can run container mirror image, when computer starting, without the need to again sending start operational order, this container mirror image will start automatically; In the another kind of implementation of the embodiment of the present invention, after container mirror image generates, output display restarts the information of computing machine, runs container mirror image after restarting computing machine, after once restarting computing machine, all automatically can run this container mirror image later.Can including, but not limited to following content when output display restarts the information of computing machine in the embodiment of the present invention, such as, user can manually select to restart computing machine, if user does not select manually to restart computing machine, then in Preset Time, can reset automatically computing machine; Or when output display restarts the information of computing machine, reset automatically computing machine.The specific implementation of the embodiment of the present invention to start-up simulation machine does not again limit.
When sending start-up operation instruction operation container mirror image, can adopt but be not limited to following mode and realize running container mirror image, such as, send start-up operation instruction operation container mirror image by keyboard; Or, by mouse action start-up operation instruction operation container mirror image.The specific implementation of the embodiment of the present invention to start-up operation instruction operation container mirror image does not limit.
Further, the method provided to better understand the embodiment of the present invention starts multiple process by a container, is described below by by a concrete scene.When service entry to be launched is start service and application scenarios is Linux, after Linux loads, computer equipment is driven and carries out initialization, first Linux carries out the guiding of kernel, then the target process that in container mirror image, container process control calls is performed, load the script file in preset catalogue, wherein, memory analysis, disk analysis be service entry to be launched for start service and application scenarios is Linux time necessary function application, target process calls above-mentioned start and serves necessary function and apply the multiple subprocesss operationally needed, computer booting starts, just achieve thus and start multiple process by a container.Above-mentioned example be service entry to be launched with embody rule scene in conjunction with time to the explanation running container mirror image, wherein, the illustrative examples that the start-up parameter related to, Booting sequence only provide for ease of explanation, concrete start service procedure please refer to implementation known in the art.
Further, the embodiment of the present invention also provides a kind of device using container to carry out multi-process startup, and as shown in Figure 2, this device comprises:
Setting unit 21, for arranging predetermined directory to container process control, container process control can realize calling of multiple subprocess by calling a target process, predetermined directory is arranged to container process control, wherein, this predetermined directory is a self-defining directory information, and the object that the embodiment of the present invention arranges predetermined directory is, when container process control is when calling a target process, can start by the execution of predetermined directory multiple subprocesss that this target process calls;
Loading unit 22, for loading the script file in the predetermined directory of setting unit 21 setting, script file comprises the necessary function application of service entry to be launched, function application operationally needs by multiple process complete, it should be noted that, the necessary function application of service entry to be launched is only comprised in this script file, and do not comprise the nonessential function application of service entry to be launched, in successive container operationally, avoid and start the nonessential function application of service entry to be launched, save resource;
Acquiring unit 23, for load the script file in predetermined directory at loading unit 22 after, obtains container mirror image, is loaded into by script file in the container process control in step 101 in predetermined directory, generate container mirror image.Predetermined directory is as the transit point between process control and script file, script file and container process control are bound, and the subprocess that the process that the function in script file being applied operationally needs is called as container process control, realizes running multiple process in a container simultaneously;
Running unit 24, for running the container mirror image that acquiring unit 23 obtains, to start multiple subprocess, when container mirror image operationally, first container process control is started, the process pid1 that the target process that container process control calls automatically performs when being container startup, the subprocess that the process that the process pid1 function called in predetermined directory is applied operationally to be needed is called as container process control, just completes the service entry to be launched starting in a container and need to be supported by multiple process thus.
Further, the call instruction for invoke script file is recorded in predetermined directory, loading unit 22, also for loading call instruction, call perform loading scripts file to start call instruction, this call instruction only for starting execution script file, when its essence is that container mirror image runs, transfer to call instruction by starting the control authority performing script file, this call instruction is an enforceability script.
Further, script file is recorded in predetermined directory, loading unit 22, also for directly loading the script file recorded in predetermined directory, to comprise the applicable script file of the necessary merit of service entry to be launched is recorded in predetermined directory, predetermined directory, when recording script file, can carry out record according to dissimilar service entry to be launched, also can according to the Booting sequence record script file of service entry to be launched.It should be noted that, when being loaded the script file in predetermined directory by this kind of mode, predetermined directory is merely able to load the script file recorded in predetermined directory, lacks certain dirigibility when loading the script file in predetermined directory.
Further, as shown in Figure 3, device also comprises:
Transmitting element 25, after running container mirror image in running unit 24, to target process sending controling instruction, control closedown or the unlatching of multiple subprocess, when container mirror image runs, the operating personnel of computing machine send the steering order of one or more subprocess closed or open under target process control to target process;
Receiving element 26, for the response signal that receiving target process sends, response signal is for recording the current closed condition of multiple subprocess or opening.
Further, as shown in Figure 4, running unit 24, comprising:
Sending module 241, for sending start-up operation instruction operation container mirror image, container mirror image is run by the mode sending start-up operation instruction, after generation container mirror image, send start operational order and can run container mirror image, when computer starting, without the need to again sending start operational order, this container mirror image will start automatically;
Restart module 242, for by restarting computer run container mirror image, after container mirror image generates, output display restarts the information of computing machine, after restarting computing machine, run container mirror image, after once restarting computing machine, all automatically can run this container mirror image later.
The use container that the embodiment of the present invention provides carries out the device of multi-process startup, first predetermined directory is set in container process control, load the script file in predetermined directory, obtain container mirror image, because container process control can realize calling of multiple subprocess by calling a target process, container process control and script file are carried out " binding ", the function comprised in script file can be applied multiple processes of operationally needing subprocess as container process control invocation target process in the embodiment of the present invention, therefore, when container mirror image runs, realize use container and start multiple process.
In the above-described embodiments, the description of each embodiment is all emphasized particularly on different fields, in certain embodiment, there is no the part described in detail, can see the associated description of other embodiments.
Be understandable that, the correlated characteristic in said method and device can reference mutually.In addition, " first ", " second " in above-described embodiment etc. are for distinguishing each embodiment, and do not represent the quality of each embodiment.
Those skilled in the art can be well understood to, and for convenience and simplicity of description, the system of foregoing description, the specific works process of device and unit, with reference to the corresponding process in preceding method embodiment, can not repeat them here.
Intrinsic not relevant to any certain computer, virtual system or miscellaneous equipment with display at this algorithm provided.Various general-purpose system also can with use based on together with this teaching.According to description above, the structure constructed required by this type systematic is apparent.In addition, the present invention is not also for any certain programmed language.It should be understood that and various programming language can be utilized to realize content of the present invention described here, and the description done language-specific is above to disclose preferred forms of the present invention.
In instructions provided herein, describe a large amount of detail.But can understand, embodiments of the invention can be put into practice when not having these details.In some instances, be not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, be to be understood that, in order to simplify the disclosure and to help to understand in each inventive aspect one or more, in the description above to exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or the description to it sometimes.But, the method for the disclosure should be construed to the following intention of reflection: namely the present invention for required protection requires feature more more than the feature clearly recorded in each claim.Or rather, as claims below reflect, all features of disclosed single embodiment before inventive aspect is to be less than.Therefore, the claims following embodiment are incorporated to this embodiment thus clearly, and wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and adaptively can change the module in the equipment in embodiment and they are arranged in one or more equipment different from this embodiment.Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and multiple submodule or subelement or sub-component can be put them in addition.Except at least some in such feature and/or process or unit be mutually repel except, any combination can be adopted to combine all processes of all features disclosed in this instructions (comprising adjoint claim, summary and accompanying drawing) and so disclosed any method or equipment or unit.Unless expressly stated otherwise, each feature disclosed in this instructions (comprising adjoint claim, summary and accompanying drawing) can by providing identical, alternative features that is equivalent or similar object replaces.
In addition, those skilled in the art can understand, although embodiments more described herein to comprise in other embodiment some included feature instead of further feature, the combination of the feature of different embodiment means and to be within scope of the present invention and to form different embodiments.Such as, in the following claims, the one of any of embodiment required for protection can use with arbitrary array mode.
All parts embodiment of the present invention with hardware implementing, or can realize with the software module run on one or more processor, or realizes with their combination.It will be understood by those of skill in the art that the some or all functions of the some or all parts in the denomination of invention (as determined the device of website internal chaining grade) that microprocessor or digital signal processor (DSP) can be used in practice to realize according to the embodiment of the present invention.The present invention can also be embodied as part or all equipment for performing method as described herein or device program (such as, computer program and computer program).Realizing program of the present invention and can store on a computer-readable medium like this, or the form of one or more signal can be had.Such signal can be downloaded from internet website and obtain, or provides on carrier signal, or provides with any other form.
The present invention will be described instead of limit the invention to it should be noted above-described embodiment, and those skilled in the art can design alternative embodiment when not departing from the scope of claims.In the claims, any reference symbol between bracket should be configured to limitations on claims.Word " comprises " not to be got rid of existence and does not arrange element in the claims or step.Word "a" or "an" before being positioned at element is not got rid of and be there is multiple such element.The present invention can by means of including the hardware of some different elements and realizing by means of the computing machine of suitably programming.In the unit claim listing some devices, several in these devices can be carry out imbody by same hardware branch.Word first, second and third-class use do not represent any order.Can be title by these word explanations.

Claims (10)

1. use container to carry out a method for multi-process startup, it is characterized in that, comprising:
Arrange predetermined directory to container process control, described container process control can realize calling of multiple subprocess by calling a target process;
Load the script file in described predetermined directory, obtain container mirror image, described script file comprises the necessary function application of service entry to be launched, and described function application operationally needs by multiple process complete;
Run described container mirror image, to start described multiple subprocess.
2. method according to claim 1, is characterized in that, records the call instruction for invoke script file in described predetermined directory, and the script file in the described predetermined directory of described loading, comprising:
Load described call instruction, call the described script file of execution loading to start described call instruction.
3. method according to claim 1, is characterized in that, records script file in described predetermined directory, and the script file in the described predetermined directory of described loading, comprising:
The script file recorded in the described predetermined directory of direct loading.
4. method according to claim 1, is characterized in that, after the described container mirror image of operation, described method also comprises:
To described target process sending controling instruction, control closedown or the unlatching of described multiple subprocess;
Receive the response signal that described target process sends, described response signal is for recording the current closed condition of described multiple subprocess or opening.
5. method according to claim 1, is characterized in that, the described container mirror image of described operation, comprising:
Send container mirror image described in start-up operation instruction operation;
Or by restarting container mirror image described in computer run.
6. use container to carry out a device for multi-process startup, it is characterized in that, comprising:
Setting unit, for arranging predetermined directory to container process control, described container process control can realize calling of multiple subprocess by calling a target process;
Loading unit, for loading the script file in the described predetermined directory of described setting unit setting, described script file comprises the necessary function application of service entry to be launched, and described function application operationally needs by multiple process complete;
Acquiring unit, after loading the script file in described predetermined directory at described loading unit, obtains container mirror image;
Running unit, for running the described container mirror image that described acquiring unit obtains, to start described multiple subprocess.
7. device according to claim 6, it is characterized in that, record the call instruction for invoke script file in described predetermined directory, described loading unit, also for loading described call instruction, call the described script file of execution loading to start described call instruction.
8. device according to claim 6, is characterized in that, records script file in described predetermined directory, described loading unit, also for directly loading the script file recorded in described predetermined directory.
9. device according to claim 6, is characterized in that, described device also comprises:
Transmitting element, after running described container mirror image in described running unit, to described target process sending controling instruction, controls closedown or the unlatching of described multiple subprocess;
Receiving element, for receiving the response signal that described target process sends, described response signal is for recording the current closed condition of described multiple subprocess or opening.
10. device according to claim 6, is characterized in that, described running unit, comprising:
Sending module, for sending container mirror image described in start-up operation instruction operation;
Restart module, for by restarting container mirror image described in computer run.
CN201510374010.6A 2015-06-30 2015-06-30 Method and device for multi-process start by container Pending CN104899068A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510374010.6A CN104899068A (en) 2015-06-30 2015-06-30 Method and device for multi-process start by container

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510374010.6A CN104899068A (en) 2015-06-30 2015-06-30 Method and device for multi-process start by container

Publications (1)

Publication Number Publication Date
CN104899068A true CN104899068A (en) 2015-09-09

Family

ID=54031746

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510374010.6A Pending CN104899068A (en) 2015-06-30 2015-06-30 Method and device for multi-process start by container

Country Status (1)

Country Link
CN (1) CN104899068A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105607944A (en) * 2015-12-18 2016-05-25 北京奇虎科技有限公司 Method and device for sharing application environment
CN105677442A (en) * 2015-12-28 2016-06-15 湖南蚁坊软件有限公司 Deployment method based on container virtualization
CN105867955A (en) * 2015-09-18 2016-08-17 乐视云计算有限公司 Deployment system and deployment method of application program
CN108334378A (en) * 2017-12-19 2018-07-27 中国科学院声学研究所 The method and apparatus for improving browser startability
CN111309387A (en) * 2020-01-22 2020-06-19 阿里巴巴集团控股有限公司 Method and device for loading drive, electronic equipment and storage medium
WO2022083419A1 (en) * 2020-10-22 2022-04-28 International Business Machines Corporation Configuring hardware multithreading in containers
CN116560804A (en) * 2023-07-10 2023-08-08 中国人民解放军国防科技大学 Method and apparatus for interoperating containers using multiple container images

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102439564A (en) * 2011-10-24 2012-05-02 华为技术有限公司 Method and system for starting application program in linux container
US20150120928A1 (en) * 2013-10-24 2015-04-30 Vmware, Inc. Container virtual machines for hadoop

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102439564A (en) * 2011-10-24 2012-05-02 华为技术有限公司 Method and system for starting application program in linux container
US20150120928A1 (en) * 2013-10-24 2015-04-30 Vmware, Inc. Container virtual machines for hadoop

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
KONGXX: "《Docker同时启动多个服务》", 《HTTP://BLOG.CSDN.NET/KONGXX/ARTICLE/DETAILS/42528423》 *
云栖社区: "Docker Container同时启动多服务", 《HTTPS://YQ.ALIYUN.COM/ARTICLES/32488》 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105867955A (en) * 2015-09-18 2016-08-17 乐视云计算有限公司 Deployment system and deployment method of application program
CN105607944B (en) * 2015-12-18 2018-12-25 北京奇虎科技有限公司 A kind of method and device of sharing application environment
CN105607944A (en) * 2015-12-18 2016-05-25 北京奇虎科技有限公司 Method and device for sharing application environment
CN105677442A (en) * 2015-12-28 2016-06-15 湖南蚁坊软件有限公司 Deployment method based on container virtualization
CN108334378B (en) * 2017-12-19 2020-08-14 中国科学院声学研究所 Method and device for improving starting performance of browser
CN108334378A (en) * 2017-12-19 2018-07-27 中国科学院声学研究所 The method and apparatus for improving browser startability
CN111309387A (en) * 2020-01-22 2020-06-19 阿里巴巴集团控股有限公司 Method and device for loading drive, electronic equipment and storage medium
CN111309387B (en) * 2020-01-22 2023-04-18 阿里巴巴集团控股有限公司 Method and device for loading drive, electronic equipment and storage medium
WO2022083419A1 (en) * 2020-10-22 2022-04-28 International Business Machines Corporation Configuring hardware multithreading in containers
US11567796B2 (en) 2020-10-22 2023-01-31 International Business Machines Corporation Configuring hardware multithreading in containers
GB2615043A (en) * 2020-10-22 2023-07-26 Ibm Configuring hardware multithreading in containers
CN116560804A (en) * 2023-07-10 2023-08-08 中国人民解放军国防科技大学 Method and apparatus for interoperating containers using multiple container images
CN116560804B (en) * 2023-07-10 2023-09-05 中国人民解放军国防科技大学 Method and apparatus for interoperating containers using multiple container images

Similar Documents

Publication Publication Date Title
CN104899068A (en) Method and device for multi-process start by container
EP3011442B1 (en) Method and apparatus for customized software development kit (sdk) generation
US8510728B2 (en) Dynamic determination of application server runtime classloading
CN103150513B (en) The method of the implantation information in interception application program and device
US8839194B2 (en) Component-based web application development framework used for creating web page
USRE44299E1 (en) System and method for enabling automated run-time input to network bootstrapping processes
CN105204917B (en) The method and device of loading configuration file in application program launching
CN105045643A (en) Starting method and device of Launchers in Android system
CN104915239A (en) Method and device for carrying out multi-process startup by container
CN109582438B (en) Virtual machine with multiple intelligent contract execution engines and implementation method thereof
EP3019956A1 (en) Method and apparatus for firmware virtualization
CN104036019A (en) Method and device for opening webpage links
CN109240697A (en) Calling processing method and device, storage medium
CN104778075A (en) Method and device for calling Java layer API (Application Program Interface) by native layer in Android system
CN103595769B (en) Method and device for achieving file uploading through SDK
CN110083366B (en) Application running environment generation method and device, computing equipment and storage medium
CN112363728B (en) Cross-platform compiling method and system supporting continuous integrated construction
CN114072765B (en) Method for container-based virtualization system
US20160335068A1 (en) Checks for software extensions
CN104484176A (en) Android system window object acquiring method and android system window object acquiring device
CN111897565A (en) Data processing method, device and equipment based on Internet of things
CN115495158A (en) Dynamic construction method of system service in microkernel operating system
CN109144575A (en) Device, method, electronic equipment and the memory of cross operating system operation application
CN102902564A (en) Method and device for installing patches
CN106570143B (en) Method and device for sending response object

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into 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: 20150909