Customized container engine, method, host machine and medium
By integrating multiple processes into a daemon process in the container engine and tailoring functions according to business scenarios, the problem of high resource consumption of traditional container engines is solved and more efficient and reliable container management is achieved.
Patent Information
- Application Number
- CN202310151941.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-22
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2043-02-22
AI Technical Summary
Traditional container engines run unnecessary components at startup or when business containers are created, resulting in excessive resource consumption and high complexity, making it difficult to adapt to embedded environments with limited resources.
Design a customized container engine that integrates dockerd, containerd and shim processes through a target daemon process, uses function calls to achieve functional integration between processes, tailors functional modules according to business scenarios, provides core functional modules and optional functional modules, and reduces resources Consumption and complexity.
It implements a lightweight container engine, which is suitable for embedded environments with limited resources, reduces the resource consumption and complexity of the container engine, and improves the flexibility and reliability of the container engine.
Smart Images

Figure CN118535273A
Abstract
Description
Technical Field
[0001] The present application relates to the field of container technology, and in particular to a customized container engine, a configuration method for a container engine, a container startup method, a host machine, and a computer-readable storage medium. Background Art
[0002] With the popularity of microservice architecture in software design, more and more containers are used as infrastructure to carry applications, and microservices have become deeply dependent on containerization technology.
[0003] In the traditional container engine, that is, under the docker (a lightweight "virtual machine", an open platform for developing, delivering and running applications) architecture, the current traditional docker engine, in addition to the functions related to the container life cycle and the image life cycle, also includes some other functions that are rarely used or even not used, such as SwarmKit (Docker cluster management and container orchestration tool), buildKit (image building tool), and even Network (network management module) and Volume (volume management module). For example, in some wireless base station embedded single-board environments, the Network does not use the default network provided by the docker engine. The network is customized and planned by the business itself according to the required network, and after the business container is started, it directly enters the container network namespace for network management. However, when the traditional docker engine is started or when the business container is created, unnecessary components such as the network will still run, thereby consuming additional resources. Summary of the invention
[0004] The main purpose of this application is to provide a customized container engine, a container engine configuration method, a container startup method, a host machine and a computer-readable storage medium, aiming to solve the technical problems of complex container engines and high resource consumption in conventional technologies.
[0005] To achieve the above objectives, the present application provides a customized container engine, which includes: A core function module, wherein the core function module includes an interface server submodule, a container lifecycle submodule, and an image lifecycle submodule; An optional functional module, wherein the optional functional module includes configurable and selectable optional sub-modules.
[0006] Exemplarily, the customized container engine consists of a target daemon process, in which a dockerd process, a containerd process and a shim process are integrated, and function calls are used in the target daemon process to implement the functions of each process integrated in the target daemon process.
[0007] The present application also provides a method for configuring a container engine, which is applied to the customized container engine as described above, and includes: The optional sub-module in the optional functional module is selected according to the business scenario configuration to obtain the customized container engine.
[0008] The present application also provides a container startup method, which is applied to the customized container engine as described above, and the method includes: Receiving a start request for starting a container through the interface server submodule, and creating a container function based on the start request; The service container corresponding to the start request is started by calling the container function.
[0009] The present application also provides a host machine, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the container engine configuration method as described above, and the steps of the container startup method as described above.
[0010] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the container engine configuration method and the steps of the container startup method as described above are implemented.
[0011] The present application also provides a configuration device for a container engine, the device is applied to the customized container engine as described above, and the device includes: The customization module is used to select the optional sub-module in the optional function module according to the business scenario configuration to obtain the customized container engine.
[0012] The present application also provides a container startup device, which is applied to the customized container engine as described above, and includes: A creation module, configured to receive a start request for starting a container through the interface server submodule, and create a container function based on the start request; The calling module is used to start the business container corresponding to the start request by calling the container function.
[0013] The embodiment of the present application proposes a customized container engine, a configuration method of the container engine, a container startup method, a host machine, and a computer-readable storage medium. The customized container engine includes: a core function module, which includes an interface server submodule, a container lifecycle submodule, and an image lifecycle submodule; an optional function module, which includes a configurable and selected optional submodule. The optional submodule in the optional function module is selected according to the business scenario configuration to obtain the customized container engine.
[0014] The customized container engine is composed of a target daemon process, in which the dockerd process, containerd process and shim process are integrated, and the functions of each process integrated in the target daemon process are implemented by function calls in the target daemon process. A startup request for starting a container is received through the interface server submodule, and a container function is created based on the startup request; and a business container corresponding to the startup request is started by calling the container function.
[0015] In this application, a lightweight new customized container engine is provided, which completes the management of container life cycle and image life cycle by starting an independent target daemon process. Compared with the traditional container docker engine, the customized container engine is more suitable for running in an embedded environment with limited resources: First, compared with the traditional container engine, the customized container engine can flexibly cut functional modules according to different business scenarios, so as to reduce the complexity of the container engine itself to the greatest extent, while reducing the resource consumption of the container engine. Second, the traditional container is composed of dockerd process, containerd process, and shim process to complete the management of container life cycle and image life cycle. The customized container engine is composed of only one running daemon process, that is, a single-process container engine can complete the functions that can be completed by the cooperation of each process of the traditional container engine. Compared with the container engine of multiple processes, the resources consumed by the customized container engine will be less and more reliable. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a structural diagram of an operating device of a hardware operating environment involved in an embodiment of the present application; Figure 2 This is a diagram of the container system architecture; Figure 3 This is a schematic diagram of a traditional multi-process container engine; Figure 4 A schematic diagram of a single-process container engine according to an embodiment of a method for communicating between a container engine user and a container according to an embodiment of the present application; Figure 5This is a schematic diagram of the configuration of container engine functions according to an embodiment of a method for communication between a container engine user and a container according to an embodiment of the present application; Figure 6 This is a schematic diagram of container engine function configuration according to another embodiment of the method for communication between a container engine user and a container involved in the embodiment of the present application; Figure 7 A schematic diagram comparing the container startup process under a multi-process engine and a single-process engine in an embodiment of a method for communicating between a container engine user and a container according to an embodiment of the present application; Figure 8 A schematic diagram of a configuration device of a container engine involved in an embodiment of the present application; Fig. 9 This is a schematic diagram of a container starting device involved in an embodiment of the present application.
[0017] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0018] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0019] Reference Figure 1 , Figure 1 This is a schematic diagram of the operating equipment structure of the hardware operating environment involved in the embodiment of the present application.
[0020] like Figure 1 As shown, the operating device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0021] Those skilled in the art will understand that Figure 1The structure shown in the figure does not constitute a limitation on the operating device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0022] like Figure 1 As shown, the memory 1005 as a storage medium may include an operating system, a data storage module, a network communication module, a user interface module and a computer program.
[0023] exist Figure 1 In the running device shown, the network interface 1004 is mainly used for data communication with other devices; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the running device of the present application can be set in the running device, and the running device calls the computer program stored in the memory 1005 through the processor 1001, and performs the following operations: The optional sub-module in the optional functional module is selected according to the business scenario configuration to obtain the customized container engine.
[0024] In one embodiment, the processor 1001 may call a computer program stored in the memory 1005 and further perform the following operations: The step of selecting the optional submodule in the optional functional module according to the business scenario configuration to obtain the customized container engine includes: Before compiling the container engine, the customized container engine is generated based on the core functional modules and the configured and selected optional sub-modules.
[0025] In one embodiment, the processor 1001 may call a computer program stored in the memory 1005 and further perform the following operations: The step of selecting the optional submodule in the optional functional module according to the business scenario configuration to obtain the customized container engine also includes: After starting the customized container engine, dynamically load the configured and selected optional sub-modules into the customized container engine, or unload the configured and selected optional sub-modules in the customized container engine to generate a new customized container engine.
[0026] In one embodiment, the processor 1001 may call a computer program stored in the memory 1005 and further perform the following operations: Receiving a start request for starting a container through the interface server submodule, and creating a container function based on the start request; The service container corresponding to the start request is started by calling the container function.
[0027] In one embodiment, the processor 1001 may call a computer program stored in the memory 1005 and further perform the following operations: The step of starting the business container corresponding to the start request by calling the container function includes: If the local image does not exist, drag the container image from the image repository as the local image; After the local image is ready, a running command of the local image is generated by calling the container function, and a business container corresponding to the start request is started based on the running command.
[0028] In the field of container technology, engine: a tool for creating and managing containers, which generates containers by reading images and is responsible for pulling images from the warehouse or submitting images to the warehouse; image: similar to a virtual machine image, it is generally packaged with a basic operating system environment and multiple applications, and is a template for creating containers; container: can be regarded as a box packaged with a simplified version of the Linux system environment (including root user permissions, process space, user space, and network space, etc.) and the applications running in it; warehouse: a place where image files are centrally stored, divided into public warehouses and private warehouses. The largest public warehouse at present is the official Docker Hub. In addition, domestic Alibaba Cloud, Tencent Cloud, etc. also provide public warehouses; host: the server where the operating system running the engine is located.
[0029] Reference Figure 2 , Docker images: images: unified packaging method - > templates; Docker container: container: unified runtime environment - > based on images, running status / runtime status; Docker registry: image warehouse: warehouse for placing images - > storage of image templates. 1. The client initiates various commands and gives them to the host (DOCKER_HOST); 2. The host will call the image, and if there is an image, it will be used directly and run as a container; 3. If there is no image in the image, it will go to the registry public warehouse to pull the image, pull it locally and run it as a container.
[0030] The container engine is the basis for managing and running containers. Figure 3The traditional container engine, namely the docker engine, has the following architecture: The main components of the docker engine are the docker client, the dockerd daemon, the containerd process, and the runc process. They are jointly responsible for the creation and operation of containers. The docker client and dockerd processes, the dockerd process and the containerd process, and the containerd process and the shim process all use GRPC (grpc remote procedure call, an open source remote procedure call system initiated by Google) for inter-process communication.
[0031] 1. Once the GRPC pressure is high or the system load is high, the reliability of the communication between GRPCs will inevitably be affected, which will also affect the robustness of the docker engine. In addition, there are GRPC clients and servers (servers) in the process, and the server is a simplified version of the HTTP server (Web server), which makes the GRPC communication between processes consume a lot of resources. At the same time, when the processes communicate directly, a GRPC long link will be created, and similarly, the long link will consume a lot of resources. In addition, it can be seen that this multi-process model requires more computing and memory resources, and is not suitable for some embedded systems that are very resource-constrained, such as the Internet of Things, wearable devices, smart meters and other scenarios.
[0032] 2. In addition, in addition to the functions related to the container lifecycle and image lifecycle, the current traditional docker engine also includes some other functions that are rarely used or even not used, such as SwarmKit (Docker cluster management and container orchestration tool), buildKit (image building tool), and even Network (network management module) and Volume (volume management module). For example, in some wireless base station embedded single-board environments, the Network does not use the default network provided by the docker engine. The network is customized and planned by the business itself according to the required network, and after the business container is started, it directly enters the container network namespace to manage the network. However, when the traditional docker engine is started or when the business container is created, it will still run unnecessary components such as the network, thereby consuming additional resources.
[0033] In summary, in this application, by redesigning the container engine, the resource consumption of the container engine is reduced, the communication efficiency between the user and the container is improved, and the communication between the container engine user and the container becomes reliable.
[0034] Correspondingly, firstly, compared with the traditional container engine, the new container engine provided by this application can flexibly cut functional modules according to different business scenarios, thereby minimizing the complexity of the container engine itself and reducing the resource consumption of the container engine. The container engine has flexible function selection and can be configured according to different scenarios to reduce the size of the container engine program itself, thereby saving system resources.
[0035] Secondly, traditional containers require the cooperation of dockerd process, containerd process, and shim process to complete the management of container life cycle and image life cycle. The new container engine provided by this application consists of only one running daemon process, that is, a single-process container engine can complete the functions that can only be completed by the cooperation of various processes of the traditional container engine. Compared with multi-process container engines, this new container engine will consume fewer resources and be more reliable. Compared with traditional open source container engines, this new container engine requires fewer processes, less hardware resources (such as memory and CPU resources), and is more cost-effective.
[0036] The embodiment of the present application provides a customized container engine. In one embodiment of the customized container engine of the present application, the customized container engine includes: A core function module, wherein the core function module includes an interface server submodule, a container lifecycle submodule, and an image lifecycle submodule; An optional functional module, wherein the optional functional module includes configurable and selectable optional sub-modules.
[0037] Reference Figure 4 In this embodiment, a new lightweight customized container engine is designed. The customized container engine has the following characteristics: it provides a smaller core functional module. The core functional module of the customized container engine only includes two parts: the container life cycle and the image life cycle. The container engine uses an API server (interface server) to provide services to the outside world and create containers and images that comply with the OCI (Open Container Initiative, open container format standard) specification.
[0038] This new container engine can customize the container engine by configurably cutting out other non-core functional modules, configuring the optional functional modules of the container engine according to the business scenario, and maintaining the container based on the customized engine. This not only makes the functional configuration of the container engine more flexible, but also makes the container engine lighter.
[0039] The application scenarios of this new container engine include all operating system environments (including but not limited to MACOS, LINUX / UNIX, Windows, VXWorks, UCOS and other operating systems), as well as server operating systems and embedded operating systems.
[0040] In another embodiment of the customized container engine of the present application, the customized container engine is composed of a target daemon process, in which the dockerd process, the containerd process and the shim process are integrated, and function calls are used in the target daemon process to implement the functions of each process integrated in the target daemon process.
[0041] Reference Figure 4 In the customized container engine proposed in this application, the container engine is designed as a single process model, and the customized container engine consists of a target daemon process. Compared with the traditional docker engine, the dockerd process, the containerd process and the shim process are integrated into one process. At the same time, the functions of the integrated processes are implemented by the target daemon process using function calls.
[0042] Exemplarily, the processes integrated in the target daemon process include a dockerd process, a containerd process, and a shim process; Or, including dockerd process and containerd process; Alternatively, include the containerd process and the shim process.
[0043] In one embodiment, the processes integrated in the target daemon process may be a dockerd process, a containerd process, and a shim process, three in one; but it is not limited to three in one, and may also be a dockerd process and a containerd process, two in one; or a containerd process and a shim process, two in one. Thus, the processes are flexibly and efficiently integrated to obtain the target daemon process.
[0044] thereby: 1) Adjust the communication between processes from GRPC to: the communication between the traditional container dockerd process, containerd process, and shim process uses function call communication. When the process uses GRPC communication, the message interaction between the processes is likely to be affected when the system is under high load, resulting in container abnormalities. If multiple processes are integrated into one process, and the processes directly use function calls to communicate, the reliability of inter-process communication can be improved, so that the GRPC server can be removed, that is, the HTTP server (Web server) can be removed to save resources and solve the problem of GRPC communication disconnection under high load. 2) Merging multiple processes into one process can not only reduce the number of processes, but also reduce resource overhead. Therefore, by reducing resource consumption, the communication between the container engine user and the container becomes reliable.
[0045] In one application scenario, in order to achieve high reliability of communication among container engine components and reduce the number of container engine processes, the functions of container creation, start, stop, and deletion, which previously required the cooperation of dockerd, containerd, and shim processes, are implemented through function calls in a single process, thereby integrating the three types of processes: dockerd, containerd, and shim.
[0046] An embodiment of the present application provides a method for configuring a container engine, which is applied to the customized container engine as described above, and includes: The optional sub-module in the optional functional module is selected according to the business scenario configuration to obtain the customized container engine.
[0047] For the configurable implementation of the container engine, the core functional module of the container is a must, which mainly consists of apiserver, container lifecycle and image lifecycle functions. Other optional modules include swarmkit, buildkit, network, volume, etc. According to the business scenario configuration, select the optional submodules in the optional functional module to get a customized container engine.
[0048] Exemplarily, the step of selecting the optional submodule in the optional functional module according to the business scenario configuration to obtain the customized container engine includes: Before compiling the container engine, the customized container engine is generated based on the core functional modules and the configured and selected optional sub-modules.
[0049] Reference Figure 5Before compiling, you can select the required functional modules through the graphical configuration menu or configuration file, cut unnecessary and redundant functions, and flexibly configure the functions of the container engine. After compiling, the complexity and resource overhead of the container engine executable program itself can be effectively reduced. In one embodiment, the specific implementation steps for obtaining a customized container engine are as follows: (1) Analyze business scenario requirements and provide analysis for customized container engines.
[0050] (2) Freely select the required engine functions and tailor the functional modules through the configuration menu (graphical configuration menu or configuration file).
[0051] (3) Compile the tailored container engine to generate its executable program.
[0052] (4) Run the container engine.
[0053] Exemplarily, the step of selecting the optional submodule in the optional functional module according to the business scenario configuration to obtain the customized container engine includes: Before compiling the container engine, the customized container engine is generated based on the core functional modules and the configured and selected optional sub-modules.
[0054] Reference Figure 6 , you can also minimize the functions of the container engine first, that is, only keep the necessary container life cycle and image life cycle functions. When the container engine program is running, other optional modules can be dynamically loaded into the container engine process by means of plug-ins, or the corresponding functions can be uninstalled from the container engine. In this way, the purpose of flexibly tailoring the container engine can also be achieved. In one embodiment, the specific implementation steps for obtaining a customized container engine are as follows: (1) Compile the container engine core module and generate a minimum executable program.
[0055] (2) Start the minimum executable container engine program.
[0056] (3) Dynamically select and compile other optional functional modules of the container engine based on business needs.
[0057] (4) Load the compiled optional modules into the running process.
[0058] (5) The optional container engine function can be put into use online.
[0059] (6) When optional functions are not needed, they can be dynamically uninstalled from the container engine main process as needed to reduce engine resource consumption.
[0060] An embodiment of the present application provides a container startup method, which is applied to the customized container engine as described above, and includes: Receiving a start request for starting a container through the interface server submodule, and creating a container function based on the start request; The service container corresponding to the start request is started by calling the container function.
[0061] After the interface server submodule receives the startup request for starting the container initiated by the user, the server submodule creates a container function based on the startup request, and starts the business container corresponding to the startup request by calling the container function. Thus, the communication method of function call is directly adopted between processes, and the function call is adopted in the target daemon process to realize the functions of each process integrated in the target daemon process.
[0062] Exemplarily, the step of starting the business container corresponding to the start request by calling the container function includes: If the local image does not exist, drag the container image from the image repository as the local image; After the local image is ready, a running command of the local image is generated by calling the container function, and a business container corresponding to the start request is started based on the running command.
[0063] The client initiates various commands to the host; the host calls the local image. If a local image exists, it will be used directly and run as a container. If there is no local image, it will go to the registry to pull the image, drag it to the local and run it as a container. Then, after the local image is ready, the running command of the local image is generated by calling the container function, and the business container corresponding to the start request is started based on the running command.
[0064] In an application scenario, refer to Figure 7 , the process of starting a container under a single-process container engine is: 1. The user initiates a request to start a container; 2. After receiving the request to create a container, the engine's own API server processes the request, parses the parameters and goes to the backend to start a new coroutine definition to create a container function; 3. Create a container function, create a container object according to the requested parameters, and save the object information to the database. Then call the start container function; 4. Start the container function to actually start the container. When starting the container, first determine whether the local image exists. If not, drag the container image from the remote image repository; 5. When the image resources are ready, directly call the runtime command to start the main process of the business container, so that the business container can actually run.
[0065] In addition, refer to Figure 8 The embodiment of the present application further provides a configuration device for a container engine, the device is applied to the customized container engine as described above, and the device includes: The customization module M1 is used to select the optional sub-module in the optional function module according to the business scenario configuration to obtain the customized container engine.
[0066] Exemplarily, the configuration device of the container engine is also used for: Before compiling the container engine, the customized container engine is generated based on the core functional modules and the configured and selected optional sub-modules.
[0067] Exemplarily, the configuration device of the container engine is also used for: After starting the customized container engine, dynamically load the configured and selected optional sub-modules into the customized container engine, or unload the configured and selected optional sub-modules in the customized container engine to generate a new customized container engine.
[0068] Reference Fig. 9 The present application also provides a container startup device, which is applied to the customized container engine as described above, and includes: A creation module N1 is used to receive a start request for starting a container through the interface server submodule, and create a container function based on the start request; The calling module N2 is used to start the business container corresponding to the start request by calling the container function.
[0069] Exemplarily, the calling module is also used for: If the local image does not exist, drag the container image from the image repository as the local image; After the local image is ready, a running command of the local image is generated by calling the container function, and a business container corresponding to the start request is started based on the running command.
[0070] The configuration device and container startup device of the container engine provided in the present application respectively adopt the configuration method and container startup method of the container engine in the above-mentioned embodiments to solve the technical problems of the complexity and high resource consumption of the container engine in the conventional technology. Compared with the conventional technology, the beneficial effects of the configuration device and container startup device of the container engine provided in the embodiment of the present application are the same as the beneficial effects of the configuration method and container startup method of the container engine provided in the above-mentioned embodiment, and the other technical features in the configuration device and container startup device of the container engine are the same as the features disclosed in the above-mentioned embodiment method, which will not be repeated here.
[0071] In addition, an embodiment of the present application also provides a host machine, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the container engine configuration method as described above, and the steps of the container startup method as described above.
[0072] In addition, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the container engine configuration method as described above and the steps of the container startup method as described above are implemented.
[0073] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or system including the element.
[0074] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to conventional technology can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, including a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0075] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A customized container engine, characterized in that: The customized container engine includes: A core function module, wherein the core function module includes an interface server submodule, a container lifecycle submodule, and an image lifecycle submodule; An optional functional module, wherein the optional functional module includes configurable and selectable optional sub-modules.
2. The customized container engine according to claim 1, characterized in that: The customized container engine consists of a target daemon process, in which the dockerd process, the containerd process and the shim process are integrated, and function calls are used in the target daemon process to implement the functions of each process integrated in the target daemon process.
3. The customized container engine according to claim 2, characterized in that: The processes integrated in the target daemon process include a dockerd process, a containerd process, and a shim process; Or, including dockerd process and containerd process; Alternatively, include the containerd process and the shim process.
4. A method for configuring a container engine, characterized in that: The method is applied to the customized container engine according to claim 1, and the method comprises: The optional sub-module in the optional functional module is selected according to the business scenario configuration to obtain the customized container engine.
5. The method for configuring a container engine according to claim 4, wherein: The step of selecting the optional submodule in the optional functional module according to the business scenario configuration to obtain the customized container engine includes: Before compiling the container engine, the customized container engine is generated based on the core functional modules and the configured and selected optional sub-modules.
6. The method for configuring a container engine according to claim 4, wherein: The step of selecting the optional submodule in the optional functional module according to the business scenario configuration to obtain the customized container engine also includes: After starting the customized container engine, dynamically load the configured and selected optional sub-modules into the customized container engine, or unload the configured and selected optional sub-modules in the customized container engine to generate a new customized container engine.
7. A container startup method, characterized in that: The method is applied to the customized container engine as claimed in claim 2 or 3, and the method comprises: Receiving a start request for starting a container through the interface server submodule, and creating a container function based on the start request; The service container corresponding to the start request is started by calling the container function.
8. The container startup method according to claim 7, characterized in that: The step of starting the business container corresponding to the start request by calling the container function includes: If the local image does not exist, drag the container image from the image repository as the local image; After the local image is ready, a running command of the local image is generated by calling the container function, and a business container corresponding to the start request is started based on the running command.
9. A host machine, characterized in that: The host machine includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the method for configuring the container engine as described in any one of claims 4 to 6 and the steps of the method for starting the container as described in any one of claims 7 to 8 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the container engine configuration method according to any one of claims 4 to 6 and the steps of the container startup method according to any one of claims 7 to 8 are implemented.
Citation Information
Patent Citations
Service container engine
CN103942052A
IP monitoring and recycling system and method based on network namespace management and control
CN111163189A
Cloud native container runtime method
CN112231061A
Container management method and device, electronic equipment and storage medium
CN114661426A
Container creation method and device, electronic equipment and computer readable storage medium
CN114840310A
