Method for providing container service, container system and related device

By providing a combination of basic mirroring and public mirroring, the problems of large storage space occupied, complex management and low update efficiency in container image management and update are solved, and efficient image management and update are achieved.

CN119557042APending Publication Date: 2025-03-04HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311653766.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-09-04
Filing Date
2023-11-30
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

The prior art has problems such as large storage space usage, complex management and low update efficiency when managing and updating container images.

Method used

By providing a combination of basic mirroring and public mirroring, users can choose basic mirroring to create containers and mount public mirrors in containers, avoiding downloading public mirrors, reducing storage space usage, and facilitate management and rapid updates.

Benefits of technology

It reduces the storage space occupied by container images, simplifies the image management process, and improves the efficiency of image updates and releases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119557042A_ABST
    Figure CN119557042A_ABST
Patent Text Reader

Abstract

The invention discloses a method for providing container service, a container system and a related device, and belongs to the technical field of containers. The method comprises the steps that a container system provides a basic mirror image and a public mirror image for a user, the basic mirror image is used for creating a container, the public mirror image is mounted, the public mirror image does not need to be downloaded, and occupied storage space of a node where the container is located is reduced. And moreover, the public mirror image independently exists, so that the public mirror image is convenient to manage and quickly update and upgrade. The public mirror image is mounted, so that the container created for the user can be quickly updated by quickly updating the public mirror image. And a public mirror image does not need to be downloaded, and container creation is more efficient through a mounting mode.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to Chinese patent application No. 202311132414.5 filed on September 4, 2023, with invention name “Container application method, container system and related devices”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of container technology, and in particular to a method for providing container services, a container system and related devices. Background Art

[0003] At present, the Internet and traditional industries have been deeply integrated. In the rapidly changing market environment, business models are constantly being innovated, and application software in the Internet must be quickly iterated to adapt to new business needs. In this context, container (Docker) technology came into being, and application software deployment through containers is becoming more and more widespread.

[0004] For example, container technology is applied to distributed clusters. Each node in the distributed cluster can run multiple containers, each of which contains an independent container image. In this way, each node can carry multiple applications at the same time, and through the isolation of container images, they are ensured not to interfere with each other. The combination of distributed clusters and container technology provides a high-performance, more flexible, scalable and manageable computing environment, through which services are provided to users. How to use container technology to provide users with more efficient services is currently a key issue of concern. Summary of the invention

[0005] The present application provides a method for providing container services, a container system and related devices, which can improve the management difficulty of container images and provide users with more efficient services. The technical solution is as follows:

[0006] In a first aspect, a method for providing a container service is provided, which is applied to a container system, wherein the container system provides a plurality of base images and public images corresponding to the plurality of base images, wherein the public image includes a public part of a plurality of preset images, and the plurality of base images include a non-public part of the plurality of preset images, and each base image corresponds to a preset image; the method comprises:

[0007] A container image selection interface is provided, wherein the container image selection interface is used to instruct a user to select a base image for creating a first container from the multiple base images; an identifier of a first base image selected by the user from the container image selection interface is received; based on the identifier of the first base image, a first container is created using the first base image, and a public image is mounted in the first container, wherein the first container is used to provide services for the user.

[0008] In this solution, the container system provides users with basic images and public images. Users can create containers using basic images and mount public images without downloading public images, which reduces the storage space occupied by the node where the container is located. In addition, since there is a separate public image for public use, it is easy to manage and quickly update and upgrade the public image. Since the public image is mounted, the container created for the user can be quickly updated by quickly updating the public image. There is no need to download the public image and the mounting method also makes container creation more efficient.

[0009] Optionally, the container system includes a distributed cluster, and the method is applied to a management node in the distributed cluster, which also includes multiple working nodes; based on the identifier of the first base image, creating a first container using the first base image, including: sending a container creation instruction to the first working node, the container creation instruction carries the identifier of the first base image, the container creation instruction is used to instruct the first working node to create a first container on the first working node based on the identifier of the first base image using the first base image, and the first working node is one of the multiple working nodes.

[0010] Optionally, the multiple base images and common images are stored in a container image repository included in the distributed cluster; the container creation instruction is also used to instruct the first working node to download the first base image from the container image repository based on the identifier of the first base image when the first working node does not store the first base image.

[0011] Optionally, the above-mentioned multiple base images also include user-defined images. That is, the base images in the container system include both base images provided by the container service provider and user-defined images.

[0012] Optionally, the user has modification authority for some or all of the multiple base images, that is, the user can download some or all of the base images to the user's local device for modification, and upload the modified base images to the container system.

[0013] The user-defined image includes a customized image obtained by a user after customizing and updating one or more basic images, or also includes an original image made by the user.

[0014] Optionally, the method further includes: providing a container image download interface, the container image download interface is used to instruct the user to select a base image to be downloaded from the multiple base images; receiving the identifier of the second base image selected by the user from the container image download interface; based on the identifier of the second base image, downloading the second base image to the user's local device; providing a container image creation interface, the container image creation interface is used to instruct the user to modify the second base image; obtaining a third base image uploaded by the user from the container image creation interface, the third base image being the base image obtained after the user modifies the second base image. That is, the user can download and modify the base image through the container image download interface and the container image creation interface.

[0015] Optionally, the user does not have modification permissions on the public image.

[0016] Optionally, the method further includes: providing a public image update interface, the public image update interface is used to instruct the container service developer to update the public image; and obtaining the updated public image from the public image update interface. That is, the public image is managed and updated by the container service developer.

[0017] Optionally, the public image is stored in a container image repository, and the method further includes: replacing the public image stored in the container image repository with an updated public image. Since the public image is mounted in the container created for the user by mounting, after the public image is updated, the container created for the user will also be updated synchronously. It can be seen that this solution can quickly update all containers by updating a public image. In the related art, if you want to update the public parts of multiple preset images, you need to update and publish the multiple preset images one by one, and the node that creates the container needs to download the updated preset image again before you can use the updated preset image to update the container.

[0018] Optionally, the base image includes an operating system layer image and / or an engine layer image, and the public image includes a business layer image. That is, since the operating system and the engine usually do not need frequent maintenance and updates, the operating system layer image and the engine layer image can be used as the base image, and since the business layer usually needs frequent maintenance and updates, the content of the business layer can be made into a public image.

[0019] The engine layer image includes an artificial intelligence (AI) engine layer image.

[0020] The public image includes one or more of a security reinforcement component, a remote access component, a website service component, a cloud service software development kit (SDK), an encryption component, and a decryption component.

[0021] In a second aspect, another method for providing a container service is provided, wherein a container system provides multiple base images and public images corresponding to the multiple base images, wherein the public image includes a public part of multiple preset images, and the multiple base images include a non-public part of multiple preset images, and each base image corresponds to a preset image. The container system includes a distributed cluster, and the method is applied to a first working node in the distributed cluster; the method includes:

[0022] A container creation instruction is received, where the container creation instruction carries an identifier of a first base image, where the first base image is one of multiple base images; based on the identifier of the first base image, a first container is created using the first base image, and the public image is mounted in the first container, where the first container is used to provide services for the user.

[0023] In this solution, the container system provides users with basic images and public images. Users can create containers using basic images and mount public images without downloading public images, which reduces the storage space occupied by the node where the container is located. In addition, since there is a separate public image for public use, it is easy to manage and quickly update and upgrade the public image. Since the public image is mounted, the container created for the user can be quickly updated by quickly updating the public image. There is no need to download the public image and the mounting method also makes container creation more efficient.

[0024] Optionally, the user has modification permission on some or all of the multiple base images, and / or the user does not have modification permission on the public image.

[0025] Optionally, the method further includes: deleting the container images that meet the aging condition on the first working node. That is, the working node in this solution can also automatically clean up the aged images, thereby reducing unnecessary storage space waste on the working node.

[0026] The aging condition includes that the version of the container image is lower than the reference version, and / or the time when the container image was last used exceeds the reference time from the current time.

[0027] Optionally, the basic image includes an operating system layer image and / or an engine layer image, and the public image includes a business layer image.

[0028] Optionally, the engine layer image includes an AI engine layer image.

[0029] In a third aspect, a device for providing container services is provided, wherein the device for providing container services has the function of implementing the method for providing container services in the first aspect or the second aspect. The device for providing container services includes one or more modules, and the one or more modules are used to implement the method for providing container services provided in the first aspect or the second aspect.

[0030] In a fourth aspect, a container system is provided, where the container system is used to implement the method for providing container services provided in the first aspect or the second aspect.

[0031] In a fifth aspect, a computing device is provided, the computing device comprising a processor and a memory, the memory being used to store a program for executing the method for providing a container service provided in the first aspect or the second aspect, and storing data involved in implementing the method for providing a container service provided in the first aspect or the second aspect. The processor is configured to execute the program stored in the memory. The computing device may also include a communication bus, which is used to establish a connection between the processor and the memory.

[0032] In a sixth aspect, a computing device cluster is provided, the computing device cluster comprising at least one computing device, each computing device comprising a processor and a memory; the processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster performs the steps of the method for providing container services as provided in the first aspect or the second aspect above.

[0033] In a seventh aspect, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is executed on a computer, the computer executes the method for providing container services described in the first aspect or the second aspect.

[0034] In an eighth aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the method for providing container services as described in the first or second aspect above.

[0035] The technical effects obtained in the above-mentioned third to eighth aspects are similar to the technical effects obtained by the corresponding technical means in the first or second aspect, and will not be repeated here.

[0036] The technical solution provided by this application can at least bring the following beneficial effects:

[0037] In this solution, the container system provides users with basic images and public images. Users can create containers using basic images and mount public images without downloading public images, which reduces the storage space occupied by the node where the container is located. In addition, since there is a separate public image for public use, it is easy to manage and quickly update and upgrade the public image. Since the public image is mounted, the container created for the user can be quickly updated by quickly updating the public image. There is no need to download the public image and the mounting method also makes container creation more efficient. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 This is an architecture diagram of a distributed cluster provided in an embodiment of the present application;

[0039] Figure 2 is a flow chart of a method for providing container services provided by an embodiment of the present application;

[0040] Figure 3 is a schematic diagram of a container image provided by an embodiment of the present application;

[0041] Figure 4 This is an architecture diagram of a container system provided by an embodiment of the present application;

[0042] Figure 5 is a structural schematic diagram of a device for providing container services provided in an embodiment of the present application;

[0043] Figure 6 is a structural schematic diagram of another device for providing container services provided in an embodiment of the present application;

[0044] Figure 7 is a schematic diagram of the structure of a computing device provided in an embodiment of the present application;

[0045] Figure 8 is a schematic diagram of the structure of a computing device cluster provided in an embodiment of the present application;

[0046] Fig. 9 It is a structural diagram of another computing device cluster provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0048] First, the background technology and implementation environment involved in the embodiments of the present application are introduced.

[0049] Container images are a lightweight, portable, and consistent deployment method that accelerates the development and delivery of cloud-native applications. Using container images, you can create containers for users so that they can work in the container. For example, a container can provide users with a development environment in which they can develop program code. The development environment can be an AI development environment, and the container is used to develop AI models or engines, etc. For another example, the development environment is an application (APP) development environment, and the container is used to develop a variety of APPs. Of course, containers can also provide users with services or environments other than the development environment to facilitate users to implement any possible operations in the container.

[0050] Taking the AI ​​development environment provided by containers as an example, in AI scenarios, container images greatly simplify the development, deployment and management process of AI models and engines. Through container images, users (such as developers) can package applications and their dependencies into a portable unit that can be deployed in any environment. Container images can provide a consistent operating environment, eliminating configuration problems and dependency conflicts caused by different environments. At the same time, the lightweight and fast startup capabilities of container images make it more efficient to deploy and expand applications in cloud environments. At present, comprehensive cloudification and containerization are being actively promoted. Containerization solutions mainly include hosted container services, container orchestration tools, and container-related automation and management tools.

[0051] A distributed cluster is a relatively powerful computing architecture. A distributed cluster includes multiple working nodes. These multiple working nodes may include computing nodes with computing resources as the core, or may also include nodes with other resources as the core. Working nodes may have different names in different scenarios, and the embodiments of the present application do not limit this. Taking the multiple working nodes including multiple computing nodes as an example, in some scenarios, these multiple computing nodes use network connections to provide users with high-performance and large-scale computing power through collaborative work. Distributed clusters distribute the computing load to each computing node, thereby realizing parallel computing. Each computing node has independent computing power and storage resources. Through mutual communication and collaboration, data and tasks are effectively shared between computing nodes, accelerating the computing process.

[0052] Distributed clusters are characterized by scalability and high availability. They can dynamically increase or decrease the number of working nodes in the cluster as needed, thereby flexibly adjusting or allocating node resources to meet computing needs of different scales and complexities. At the same time, since the working nodes in the cluster are independent of each other, when a working node fails or fails, other working nodes can continue to work, ensuring the continuous availability of the entire cluster. In cloud computing scenarios, distributed clusters can support large-scale data processing and analysis, accelerate machine learning and deep learning, and the training of large models, and provide real-time data processing and flexible computing power.

[0053] Currently, container technology has been applied to distributed clusters. In a distributed cluster, each working node can run multiple containers, each of which contains an independent container image. In this way, each node can carry multiple applications at the same time, and through the isolation of container images, ensure that they do not interfere with each other. The combination of distributed clusters and container technology provides a more flexible, scalable and manageable computing environment. In other words, distributed clusters provide high-performance computing capabilities, while container images simplify the deployment and management of applications, making it more convenient and reliable to deploy and run applications in distributed clusters.

[0054] In the related technologies of distributed cluster architecture based on container technology, a series of AI interactive development and training environments that support containerization are provided, providing convenient and efficient services for AI application developers. These services provide a wide variety of container images based on conditions such as AI engine type, driver version or operating system for AI application developers to choose based on their own business scenarios. At present, the solution for managing containers in a distributed cluster can be summarized as follows: each working node in the cluster directly pulls the corresponding container image from the container image repository according to the container image selected by the user, and creates a business container for the user based on the pulled container image (in the embodiment of this application, the business container is referred to as a container).

[0055] However, container service developers pre-set a wide variety of container images (hereinafter referred to as pre-set images) in the container image repository. Pre-set images are usually relatively large. For example, according to data from some manufacturers, the size of each preset image is currently over 30GB. Since each working node in the distributed cluster needs to pull these preset images to create a container, the container images alone will occupy a large amount of storage space in the distributed cluster.

[0056] For example, if a distributed cluster includes 200 working nodes, each working node needs to use 30 container images, and the size of each container image is 30GB, then the storage space occupied by the container images in the distributed cluster will reach 200*30*30GB=180TB. It can be seen that this occupies a considerable amount of storage space in the distributed cluster.

[0057] Moreover, the container image management mode in the current related technology cannot quickly implement the update and adjustment of user-defined container images. Specifically, user-defined container images generally need to be built based on preset images provided by container cloud vendor services, but the service-related parts of the preset images (such as permissions, security, or network access, etc.) are directly integrated into the preset images, and users cannot update and adjust them. For example, assuming that due to a cloud service security attack, the security firmware in the preset image needs to be updated. Then, after the cloud vendor updates each preset image, the user needs to re-pull the updated preset image, and then re-create the custom image with updated security firmware based on the re-pulled preset image. It can be seen that when the cloud service security is attacked, since the user's custom image is no longer a system preset image at this time, the cloud vendor cannot modify and update the user's custom image, resulting in the security attack cannot be repaired in time.

[0058] In addition, due to the wide variety of pre-set images in the related technology, the management process of container image production, modification, testing, and release is relatively complicated. For example, in a distributed cluster, each working node contains 30 container images, and these 30 container images all contain the same small file. Even if only this small file is modified, for example, this small file is a security firmware, and this security firmware is modified, it is necessary to go through at least 30 image release processes, because each container image needs to be remade and released. It can be seen that this not only increases the workload of development and operation and maintenance, but may also delay the rapid release of new or updated functions.

[0059] Based on the above problems, an embodiment of the present application provides a method for providing container services, specifically including a container management method and a container creation method. In this solution, the container system provides multiple base images and public images corresponding to the multiple base images, the public image includes the public parts of multiple preset images, the multiple base images include the non-public parts of the multiple preset images, and each base image corresponds to a preset image. That is, the public image is a container image shared by the multiple base images. In other words, the public image in this solution includes the public parts of multiple preset images in the related technology, and it can be considered that the public image is obtained by extracting the public parts of the multiple preset images. The use of public images can make container creation more efficient, while reducing the storage space occupied by the container image on the node where the container is located, and is convenient for management and rapid updating and upgrading of container images.

[0060] This solution can be applied to a distributed cluster, a single server or any other possible system architecture. The system architecture and business scenarios described in the embodiments of this application are intended to more clearly illustrate the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. It is known to those skilled in the art that with the evolution of the system architecture and the emergence of new business scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0061] Taking distributed cluster as an example, Figure 1 is a schematic diagram of a distributed cluster structure provided by an embodiment of the present application. The distributed cluster can become part or all of the container system. Figure 1 The distributed cluster includes a plurality of working nodes and a management node. The management node establishes a wireless or wired communication connection with the plurality of working nodes. Optionally, a wireless or wired communication connection is also established between the plurality of working nodes.

[0062] The management node is used to receive the identifier of the first base image selected by the user from the container image selection interface, wherein the container image selection interface is used to instruct the user to select a base image for creating a first container from multiple base images. The management node is also used to send a container creation instruction to the first working node, the container creation instruction carries the identifier of the first base image, and the container creation instruction is used to instruct the first working node to create a first container on the first working node using the first base image based on the identifier of the first base image. That is, the first working node is used to receive the container creation instruction from the management node, and based on the identifier of the first base image, use the first base image to create a first container on the first working node. See below for specific implementation methods. Figure 2 Method embodiment: wherein the first working node is one of the multiple working nodes mentioned above.

[0063] Optionally, the management node and the multiple working nodes are independent devices, or the management node and the second working node belong to the same device, and the second working node is one of the multiple working nodes.

[0064] Optionally, the distributed cluster also includes a scheduler, which is used to instruct the management node to assign work to the multiple working nodes, such as assigning nodes for creating and running containers. The scheduler can be an independent device, such as a control node. Alternatively, the scheduler is a module deployed on the control node, which can be implemented by software or hardware or a combination of software and hardware. Alternatively, the scheduler is a module deployed on the management node, which can be implemented by software or hardware or a combination of software and hardware. Of course, the scheduler can also be deployed on any working node.

[0065] Next, the method for providing container services provided by the embodiment of the present application is introduced.

[0066] Figure 2 This is a flowchart of a method for providing container services provided by an embodiment of the present application. The method is applied to a container system, which can be the container system introduced above, that is, the container system provides multiple base images and public images corresponding to the multiple base images, the public image includes the public parts of multiple preset images, the multiple base images include the non-public parts of the multiple preset images, and each base image corresponds to a preset image. Please refer to Figure 2 , the method comprises the following steps.

[0067] Step 201: providing a container image selection interface, where the container image selection interface is used to instruct a user to select a base image for creating a first container from a plurality of base images.

[0068] In an embodiment of the present application, the container system may be a cloud system that provides a container service. The container system may include a distributed cluster, and each working node in the distributed cluster may be implemented by one server or multiple servers. The container system may also include a single server, which may also be implemented by one server or multiple servers.

[0069] The container system provides a container image selection interface for users to select the base image required to create a container. The base image can refer to a container image in a container image repository, for example, a base image is a container image pre-installed in a container image repository. The container image repository also includes public images, which do not require users to select through the container image selection interface.

[0070] Exemplarily, a container image selection interface is presented on a user's local device, and the container image selection interface may display the name or other identifier of each base image in a plurality of base images, and may also display relevant introductions to each base image, such as introductions to the functions of the base image. The user may select at least one base image according to needs. The selection method provided by the container image selection interface to the user may include a click method, a check method, or other methods.

[0071] Of course, the container image selection interface can also display prompt information of multiple base images, such as prompt information for prompting the user to enter the name or other identifier of the base image required to create the first container. In other words, the container image selection interface can also support the user to select a base image by entering the image name or other identifier.

[0072] It should be understood that the container image selection interface can support any one or more methods of selecting a base image, for example, supporting both clicking or checking, and supporting the user entering an image name, which is not limited in this embodiment of the present application.

[0073] In some embodiments, the base image includes an operating system layer image and / or an engine layer image, and the public image includes a business layer image. That is, in these embodiments, the base image is made according to the operating system and / or the engine, and the public image is made according to the service business. In other embodiments, the base image and the public image can also be made according to other division requirements, which is not limited in the embodiments of the present application.

[0074] Among them, the operating system layer image includes various types and versions of operating system images. Figure 3 As shown, the operating system layer image includes unutu18.04 system image, debian10.2 system image, centos8.2 system image or other system images.

[0075] The engine layer images include engine images of various fields, types, and versions. For example Figure 3 As shown, in the application of container technology in AI scenarios, the engine layer image includes the AI ​​engine layer image, such as the pytorch engine image, the mindspore engine image, the mxnet engine image or other engine images.

[0076] Public images may include images of service businesses provided by container service developers or third parties. For example, public images include one or more of security reinforcement components, remote access components, website service components, cloud service software development kits (SDKs), encryption components, and decryption components.

[0077] Taking AI scenarios as an example, the contents of the AI ​​engine layer and the operating system layer in different container images are usually different, which is usually determined by factors such as different AI engine types and operating system types. The biggest feature of these two layers is that they do not need to be modified frequently, which means that the container image will not change after being pulled to the working node, and can be used by users for a long time. The business layer usually integrates cloud vendor business-related components, such as remote access services (such as SSH), WEB services, security reinforcement components, cloud service SDKs, encryption and decryption components, etc. The more prominent feature of the business layer is that all container images in related technologies have this part of content, and cloud vendors need to frequently modify and release this part of content as the business evolves, such as the common repair of security vulnerabilities in cloud services. Based on this, the basic image in the AI ​​scenario can include operating system layer images and AI engine layer images, and the public image includes service business-related images.

[0078] Step 202: Receive an identifier of a first base image selected by a user from a container image selection interface.

[0079] Taking the application of this solution to a distributed cluster as an example, the management node in the distributed cluster receives the identifier of the first base image selected by the user from the container image selection interface. Taking the application to a single server as an example, the server obtains the identifier of the first base image from the container image selection interface. The first base image is the base image used to create the first container.

[0080] Step 203: Based on the identifier of the first base image, a first container is created using the first base image, and the public image is mounted in the first container, where the first container is used to provide services for the user.

[0081] Taking the application of this solution in a distributed cluster as an example, one implementation method of the management node creating the first container using the first base image based on the identifier of the first base image is: sending a container creation instruction to the first working node, the container creation instruction carries the identifier of the first base image, and the container creation instruction is used to instruct the first working node to create the first container on the first working node based on the identifier of the first base image using the first base image, and the first working node is one of the multiple working nodes. That is, the first working node obtains the identifier of the first base image from the container creation instruction of the management node, and creates the first container on the first working node using the first base image based on the identifier of the first base image.

[0082] Optionally, the first working node is a working node selected from a plurality of working nodes. For example, the management node selects the first working node from the plurality of working nodes, or the distributed cluster further includes a control node, and the control node selects the first working node from the plurality of working nodes. Among them, the management node or the control node can select the working node through a scheduler. The strategy for selecting the working node can be a load balancing strategy, a random selection strategy, a sequential selection strategy, or other strategies, which is not limited in the embodiments of the present application.

[0083] The above-mentioned multiple base images and public images are stored in a container image repository included in the distributed cluster, and the above-mentioned container creation instruction is also used to instruct the first working node to download the first base image from the container image repository based on the identifier of the first base image when the first working node does not store the first base image. In other words, when the first working node does not store the first base image, the first working node needs to first download (also referred to as pull) the first base image from the container image repository based on the identifier of the first container image.

[0084] It should be understood that the container image repository can be implemented through a storage device in the container system. The storage device can be an independent storage device, that is, it exists independently, or it can be integrated on the management node or other nodes of the distributed cluster, or it can be integrated on the above-mentioned single server.

[0085] Exemplarily, the first basic image includes the unutu18.04 system image. Assuming that the first working node does not store the unutu18.04 system image, the first working node first downloads the unutu18.04 system image from the container image repository, and then uses the unutu18.04 system image to create a first container. The first container provides an unutu operating system environment.

[0086] After the first working node creates the first container, the public image is mounted in the first container. The first working node mounts the public image in the first container by synchronizing the files included in the public image to the directory of the first container.

[0087] As can be seen from the above, this solution does not need to download public images, and the base image reduces the content of the public image compared to the preset image in the related technology, and the base image is relatively small, thus saving the storage space occupied by the container image on the working node.

[0088] For example, if the container image repository includes 30 base images, and each working node contains these 30 base images, and these 30 base images share a common image, then compared with related technologies, each working node is equivalent to saving the storage space of 30 business layer images. If the scale of working nodes in the distributed cluster is large, the storage space that can be saved is very large.

[0089] In addition, since users usually have the need to customize and modify the operating system layer image and / or engine layer image, the decoupling of the operating system layer and / or engine layer from the business layer image is achieved by managing the business layer image separately. The business layer image is managed, maintained, and updated by the container service developer. After creating a container using the user-defined image, the business layer image can be mounted on the container.

[0090] In addition, multiple basic images usually do not need to be frequently updated and managed. Container service developers can manage and update public images on demand. This simplifies the management of multiple preset images in related technologies to the management of one public image in this solution, which simplifies the image management process, greatly reduces the difficulty of management, and improves the efficiency of image update and release.

[0091] Optionally, the above-mentioned multiple base images also include user-defined images. That is, the base images in the container system include both base images provided by the container service provider and user-defined images. Next, user-defined images are introduced.

[0092] In an embodiment of the present application, the user has modification authority over some or all of the above-mentioned multiple base images, that is, the user can download some or all of the base images to the user's local device for modification, and upload the modified base images to the container system.

[0093] The container system also provides a container image download interface, which is used to instruct the user to select a base image to be downloaded from the multiple base images. The specific implementation method is similar to the method in which the user selects the first base image from the multiple base images, which will not be repeated here.

[0094] After the user selects the base image to be downloaded through the container image download interface, the container system receives the identifier of the second base image selected by the user from the container image download interface, and downloads the second base image to the user's local device based on the identifier of the second base image.

[0095] The container system also provides a container image creation interface, which is used to instruct the user to modify the second base image. The container system receives the third base image uploaded by the user from the container image creation interface, and the third base image is the base image obtained after the user modifies the second base image. In other words, the user can modify the second base image to obtain the third base image, and upload the third base image.

[0096] Optionally, after the container system obtains the third base image, the third base image is stored in a container image repository.

[0097] Taking the application of this method to a distributed cluster as an example, the management node in the distributed cluster receives the identifier of the second base image selected by the user in the container image download interface, and based on the identifier of the second base image, downloads the second base image to the user's local device. The management node receives the third base image uploaded by the user from the container image production interface, and stores the third base image in the container image repository. Taking the application of this method to a single server as an example, the server receives the identifier of the second base image selected by the user from the container image download interface, and based on the identifier of the second base image, downloads the second base image to the user's local device. The server receives the third base image uploaded by the user from the container image production interface, and stores the third base image in the container image repository.

[0098] The third base image is a new version image relative to the second base image. When the container system stores the third base image in the container image repository, it obtains the storage address of the third base image, that is, the address of the third base image in the container image repository. The address of the third base image in the container image repository is similar to the address of the second base image in the container image repository, for example, the address prefix is ​​the same, and the image version number of the address suffix is ​​different. Among them, the storage address of the base image is used to download the base image, such as for the working node to download the base image, and for example, for the user's local device to download the base image.

[0099] Optionally, the container image creation interface can also support users to create images without referring to the base images in the container image repository, for example, users can create an operating system image by themselves through the container image creation interface. That is, the user-defined image includes a customized image obtained by the user after customizing and updating one or more base images, or also includes the original image created by the user.

[0100] Optionally, if the container system creates a second container for the user using the second base image, then after the user uploads the third base image, the container system is also triggered to update the second container using the third base image. In other words, the user's modification and upload of the second base image also triggers the automatic update of the second container.

[0101] In some other embodiments, the user does not have the permission to modify the above-mentioned multiple base images, that is, the container system does not support the user to modify the multiple base images provided by the container system for the user.

[0102] In the embodiment of the present application, the user does not have the right to modify the public image, and the public image is managed and updated by the container service developer. Of course, in some other embodiments, the user may also have the right to modify the public image, for example, some users with designated identities can also update the public image, such as users who cooperate with the container service provider, and some users who have been securely authenticated by the container service provider.

[0103] Taking the example of public images being managed and updated by container service developers, the container system also provides a public image update interface, which is used to instruct container service developers to update public images and obtain updated public images from the public image update interface. In other words, container service developers can manage and update public images.

[0104] The purpose of updating a public image is usually to synchronously update the containers created for each user, or to update the services provided by the public image in the container. Optionally, after the container system obtains the updated public image, it replaces the public image stored in the container image repository with the updated public image. Since the public image is mounted in the container of each user by mounting, the operation of updating the public image in the container image repository actually also synchronously updates the container on which the public image is mounted. It can be seen that this solution can quickly update and publish the content contained in the public image without modifying the preset images one by one.

[0105] The method of replacing the public image may be to delete the public image before the update, store the public image after the update, and the address of the public image before the update is the same as that of the public image after the update. Alternatively, the method of replacing the public image is to store the public image after the update, and retain the public image before the update, the address of the public image after the update may be different from that of the public image after the update, and the address of the public image after the update may be used to mount the public image after the update.

[0106] In order not to waste the storage space of the working nodes, the container system can also delete the container images that meet the aging conditions on each working node. The container system can delete container images that meet the aging conditions periodically, regularly, or under event triggering. Among them, event triggering includes operation triggering by container service developers or operation triggering by administrators or other event triggering. Multiple working nodes in the container system can delete container images according to the same or different cycles, or delete container images according to the same or different scheduled times. The objects of event triggering can include one or more working nodes. For example, the administrator can trigger the deletion of container images on one or more working nodes through operations.

[0107] Taking the application of this method to a distributed cluster as an example, each working node automatically cleans up the container images that meet the aging conditions in its own stored container images. For example, the first working node deletes the container images that meet the aging conditions on the first working node. Of course, each working node can also delete the container images that meet the aging conditions under the instruction of the management node or control node or other device, and the embodiments of the present application are not limited to this. Taking the application of this method to a single server as an example, the server can automatically clean up the container images that meet the aging conditions in its own stored container images.

[0108] The aging condition includes that the version of the container image is lower than the reference version, and / or the time when the container image was last used exceeds the reference time. Of course, the aging condition may also include other possible conditions, which are not limited in the embodiments of the present application.

[0109] Please refer to the following Figure 4 The container system shown is used to exemplify the embodiments of the present application.

[0110] See also Figure 4 The container system includes a distributed cluster, which includes a management node, multiple working nodes and a container image repository. The management node can also be called a master node. The management node is deployed with an image management component and a container creation component. Each working node is deployed with an image cleaning component and an image execution component. The container image repository is used to store basic images and public images.

[0111] The image management component is used to manage the base image and / or the public image, such as controlling the upgrade release of the base image and / or the public image, and can be used to control the image execution component on each working node. In other words, the image management component is the issuer of the management command about the base image and / or the public image, and the image execution component is the executor of the management command.

[0112] For example, the image management component is the issuer of the upgrade release instructions for the base image and / or the public image, and is used to send the upgrade release instructions for the base image and / or the public image. The image execution component is used to receive the upgrade release instructions and execute the specific actions of the upgrade release instructions. The image execution component is also used to synchronize the relevant files in the public image to the directory of the working node.

[0113] The image cleanup component is used to age the container images on the working nodes, that is, to delete the container images on the working nodes that meet the aging conditions, such as deleting container images with older versions or those that have not been used for a long time.

[0114] The container creation component is used to create and delete containers. Specifically, when creating a container using a base image, it mounts the public image file in the directory of the working node where the container is located into the container to provide corresponding services through the container.

[0115] In some embodiments, the image management component may be represented as image-manager, the container creation component may be represented as traffic-controller, the image cleanup component may be represented as image-cleanup-operator, and the image execution component may be represented as traffic-image-operator.

[0116] It should be understood that the above component names are not used to limit the functions of the components, and the components themselves are not used as the only implementation method of this solution. In specific implementations, this solution can also be implemented through other components or modules.

[0117] In summary, in the embodiment of the present application, the container system provides users with a basic image and a public image, uses the basic image to create a container, and mounts the public image. There is no need to download the public image, which reduces the storage space occupied by the node where the container is located. In addition, since there is a separate public image for public use, it is easy to manage and quickly update and upgrade the public image. Since the public image is mounted, the container created for the user can be quickly updated by quickly updating the public image. There is no need to download the public image and mount it, which also makes container creation more efficient.

[0118] Figure 5This is a schematic diagram of the structure of a device for providing container services provided by an embodiment of the present application. The device can be implemented by software, hardware, or a combination of both to become part or all of a computing device. The computing device can be any management node or server in the above method embodiment. In an embodiment of the present application, the device is included in a container system. The container system provides multiple base images and public images corresponding to the multiple base images. The public image includes the public parts of multiple preset images. The multiple base images include the non-public parts of the multiple preset images. Each base image corresponds to a preset image. See Figure 5 The device includes: a providing module 501, a receiving module 502 and a creating module 503.

[0119] A module 501 is provided, which is used to provide a container image selection interface, where the container image selection interface is used to instruct a user to select a base image for creating a first container from the multiple base images;

[0120] A receiving module 502 is used to receive an identifier of a first base image selected by a user from a container image selection interface;

[0121] The creation module 503 is used to create a first container using the first base image based on the identifier of the first base image, and mount the public image in the first container. The first container user provides services for the user.

[0122] Optionally, the method is applied to a management node in a distributed cluster, the distributed cluster also including a plurality of working nodes;

[0123] The creation module 503 includes:

[0124] A sending unit is used to send a container creation instruction to a first working node, where the container creation instruction carries an identifier of a first base image, and is used to instruct the first working node to create a first container on the first working node using the first base image based on the identifier of the first base image. The first working node is one of the multiple working nodes.

[0125] Optionally, the multiple base images and the common images are stored in a container image repository included in the distributed cluster;

[0126] The container creation instruction is also used to instruct the first working node to download the first base image from the container image repository based on the identifier of the first base image when the first working node does not store the first base image.

[0127] Optionally, the multiple base images also include user-defined images.

[0128] Optionally, the user has modification authority over some or all of the multiple base images.

[0129] Optionally, a module 501 is provided, further used to provide a container image download interface, where the container image download interface is used to instruct a user to select a base image to be downloaded from multiple base images;

[0130] The receiving module 502 is further used to receive an identifier of a second base image selected by a user from the container image download interface;

[0131] The device also includes:

[0132] A download module, configured to download the second base image to a local device of the user based on the identifier of the second base image;

[0133] Providing module 501, further used to provide a container image production interface, the container image production interface is used to instruct the user to modify the second base image;

[0134] The receiving module 502 is further configured to receive a third base image uploaded by a user from the container image creation interface, where the third base image is a base image obtained by modifying the second base image by the user.

[0135] Optionally, the user does not have modification permission on the above public image.

[0136] Optionally, a module 501 is provided, further used to provide a public image update interface, where the public image update interface is used to instruct the container service developer to update the public image;

[0137] The receiving module 502 is further configured to obtain the updated public image from the public image update interface.

[0138] Optionally, the public image is stored in a container image repository, and the device further includes:

[0139] The replacement module is used to replace the public image stored in the container image repository with an updated public image.

[0140] Optionally, the basic image includes an operating system layer image and / or an engine layer image, and the public image includes a business layer image.

[0141] Optionally, the engine layer image includes an AI engine layer image.

[0142] Optionally, the public image includes one or more of a security reinforcement component, a remote access component, a website service component, a cloud service SDK, an encryption component, and a decryption component.

[0143] In an embodiment of the present application, the container system provides users with a basic image and a public image. The basic image is used to create a container, and the public image is mounted. There is no need to download the public image, which reduces the storage space occupied by the node where the container is located. In addition, since there is a separate public image for public use, it is easy to manage and quickly update and upgrade the public image. Since the public image is mounted, the container created for the user can be quickly updated by quickly updating the public image. There is no need to download the public image and mount it, which also makes container creation more efficient.

[0144] It should be noted that: the device for providing container services provided in the above embodiment only uses the division of the above functional modules as an example when creating a container. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device for providing container services provided in the above embodiment and the method embodiment for providing container services belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0145] Figure 6 It is a structural diagram of another device for providing container services provided by an embodiment of the present application. The device can be implemented by software, hardware or a combination of both to become part or all of a computing device. The computing device can be the first working node or server in the above method embodiment. In an embodiment of the present application, the container system provides multiple base images and public images corresponding to the multiple base images. The public image includes the public parts of multiple preset images. The multiple base images include the non-public parts of the multiple preset images. Each base image corresponds to a preset image. The container system includes a distributed cluster. The device is included in the first working node in the distributed cluster. See Figure 6 , the device includes: a receiving module 601 and a creating module 602.

[0146] A receiving module 601 is used to receive a container creation instruction, where the container creation instruction carries an identifier of a first base image, where the first base image is one of the multiple base images;

[0147] The creation module 602 is used to create a first container using the first base image based on the identifier of the first base image, and mount the public image in the first container, where the public image is a container image shared by the multiple base images.

[0148] Optionally, the user has modification authority for some or all of the multiple base images, and / or the user does not have modification authority for the public image.

[0149] Optionally, the device further comprises:

[0150] The image cleaning module is used to delete the container images that meet the aging condition on the first working node.

[0151] Optionally, the aging condition includes that the version of the container image is lower than the reference version, and / or the time when the container image was last used exceeds a reference time from the current time.

[0152] Optionally, the basic image includes an operating system layer image and / or an engine layer image, and the public image includes a business layer image.

[0153] Optionally, the engine layer image includes an AI engine layer image.

[0154] In an embodiment of the present application, the container system provides users with a basic image and a public image. The basic image is used to create a container, and the public image is mounted. There is no need to download the public image, which reduces the storage space occupied by the node where the container is located. In addition, since there is a separate public image for public use, it is easy to manage and quickly update and upgrade the public image. Since the public image is mounted, the container created for the user can be quickly updated by quickly updating the public image. There is no need to download the public image and mount it, which also makes container creation more efficient.

[0155] It should be noted that: the device for providing container services provided in the above embodiment only uses the division of the above functional modules as an example when creating a container. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device for providing container services provided in the above embodiment and the method embodiment for providing container services belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0156] The providing module 501, receiving module 502, creating module 503, receiving module 601 and creating module 602 can all be implemented by software, or by hardware, or by a combination of software and hardware. Exemplarily, the implementation of the creating module 503 is described below by taking the creating module 503 as an example. Similarly, the implementation of other modules can refer to the implementation of the creating module 503.

[0157] As an example of a software functional unit, the creation module 503 may include code running on a computing instance. Among them, the computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Further, the above-mentioned computing instance may be one or more. For example, the creation module 503 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code can be distributed in the same region (region) or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code can be distributed in the same availability zone (AZ) or in different AZs, each AZ including a data center or multiple data centers with similar geographical locations. Among them, usually a region can include multiple AZs.

[0158] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same virtual private cloud (VPC) or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway needs to be set up in each VPC to achieve interconnection between VPCs through the communication gateway.

[0159] As an example of a hardware functional unit, the creation module 503 may include at least one computing device, such as a server, etc. Alternatively, the A module may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.

[0160] The multiple computing devices included in the creation module 503 can be distributed in the same region or in different regions. The multiple computing devices included in the creation module 503 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the A module can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0161] It should be noted that, in other embodiments, the creation module 503 can be used to execute any step in the method for providing container services, and other modules such as the creation module 602 can also be used to execute any step in the method for providing container services. The steps that the providing module 501, the receiving module 502, the creation module 503, the receiving module 601 and the creation module 602 are responsible for implementing can be specified as needed. The full functions of the device for providing container services are realized by respectively implementing different steps in the method for providing container services through the providing module 501, the receiving module 502 and the creation module 503, or the receiving module 601 and the creation module 602.

[0162] An embodiment of the present application also provides a container system, which includes a management node and a working node.

[0163] The management node is used to implement the corresponding functions of the management node in the above method embodiment. The working node is used to implement the corresponding functions of the working node in the above method embodiment.

[0164] Both the management node and the working node can be implemented by software or hardware. As an example, the implementation of the working node is described below. Similarly, the implementation of the management node can refer to the implementation of the working node.

[0165] As an example of a software functional unit, a working node may include code running on a computing instance. The computing instance may be at least one of a physical host (computing device), a virtual machine, a container, and other computing devices. Furthermore, the computing device may be one or more. For example, a working node may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the application may be distributed in the same region or in different regions. The multiple hosts / virtual machines / containers used to run the code may be distributed in the same AZ or in different AZs, each AZ including a data center or multiple data centers with close geographical locations. Typically, a region may include multiple AZs.

[0166] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same VPC or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway must be set up in each VPC to achieve interconnection between VPCs through the communication gateway.

[0167] The module is an example of a hardware functional unit, and the working node may include at least one computing device, such as a server, etc. Alternatively, the working node may also be a device implemented by ASIC or PLD, etc. The PLD may be implemented by CPLD, FPGA, GAL or any combination thereof.

[0168] The multiple computing devices included in the work node can be distributed in the same region or in different regions. The multiple computing devices included in the work node can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the work node can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.

[0169] The present application embodiment also provides a computing device 100. Figure 7 As shown, the computing device 100 includes: a bus 102, a processor 104, a memory 106, and a communication interface 108. The processor 104, the memory 106, and the communication interface 108 communicate with each other through the bus 102. The computing device 100 can be a server or a terminal device. It should be understood that the present application does not limit the number of processors and memories in the computing device 100.

[0170] The bus 102 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 The bus 102 is represented by only one line, but it does not mean that there is only one bus or one type of bus. The bus 102 may include a path for transmitting information between various components of the computing device 100 (eg, the memory 106, the processor 104, and the communication interface 108).

[0171] The processor 104 may include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0172] The memory 106 may include a volatile memory, such as a random access memory (RAM). The processor 104 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).

[0173] The memory 106 stores executable program codes, and the processor 104 executes the executable program codes to respectively implement the functions of the aforementioned providing module 501, receiving module 502, and creating module 503, or receiving module 601 and creating module 602, thereby implementing the method for providing container services. That is, the memory 106 stores instructions for executing the method for providing container services.

[0174] Alternatively, the memory 106 stores executable codes, and the processor 104 executes the executable codes to respectively implement the functions of the aforementioned management node or working node or server, thereby implementing the method for providing container services. That is, the memory 106 stores instructions for executing the method for providing container services.

[0175] The communication interface 108 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 100 and other devices or a communication network.

[0176] The embodiment of the present application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smart phone.

[0177] like Figure 8As shown, the computing device cluster includes at least one computing device 100. The memory 106 in one or more computing devices 100 in the computing device cluster may store the same instructions for executing the method for providing container services.

[0178] In some possible implementations, the memory 106 of one or more computing devices 100 in the computing device cluster may also store partial instructions for executing the method for providing container services. In other words, the combination of one or more computing devices 100 may jointly execute instructions for executing the method for providing container services.

[0179] It should be noted that the memory 106 in different computing devices 100 in the computing device cluster may store different instructions, which are respectively used to execute part of the functions of the management node or the working node or the server. That is, the instructions stored in the memory 106 in different computing devices 100 may implement the functions of one or more modules of the providing module 501, the receiving module 502 and the creating module 503, or the receiving module 601 and the creating module 602.

[0180] In some possible implementations, one or more computing devices in the computing device cluster may be connected via a network, which may be a wide area network or a local area network, etc. Fig. 9 A possible implementation is shown. Fig. 9 As shown, two computing devices 100A and 100B are connected via a network. Specifically, the network is connected via a communication interface in each computing device. In this type of possible implementation, the memory 106 in the computing device 100A stores instructions for executing the functions of the providing module 501. At the same time, the memory 106 in the computing device 100B stores instructions for executing the functions of the receiving module 502 and the creating module 503. Alternatively, the memory 106 in the computing device 100A stores instructions for executing the functions of the receiving module 601. At the same time, the memory 106 in the computing device 100B stores instructions for executing the functions of the creating module 602.

[0181] Fig. 9 The connection mode between the computing device clusters shown may be that considering that the method for providing container services provided by the present application requires a large amount of data storage and calculation, etc., it is considered that the functions implemented by the receiving module 502 and the creating module 503 are handed over to the computing device 100B for execution, or the functions of the creating module 602 are handed over to the computing device 100B for execution.

[0182] It should be understood that Fig. 9The functions of the computing device 100A shown in FIG. 1 may also be completed by multiple computing devices 100. Similarly, the functions of the computing device 100B may also be completed by multiple computing devices 100.

[0183] The present application embodiment also provides another computing device cluster. The connection relationship between the computing devices in the computing device cluster can be similar to that of Figure 8 and Fig. 9 The connection mode of the computing device cluster is shown. The difference is that the memory 106 in one or more computing devices 100 in the computing device cluster may store the same instructions for executing the method for providing container services.

[0184] In some possible implementations, the memory 106 of one or more computing devices 100 in the computing device cluster may also store partial instructions for executing the method for providing container services. In other words, the combination of one or more computing devices 100 may jointly execute instructions for executing the method for providing container services.

[0185] It should be noted that the memory 106 in different computing devices 100 in the computing device cluster may store different instructions for executing part of the functions of the container system. That is, the instructions stored in the memory 106 in different computing devices 100 may implement the functions of one or more devices in the management node and the working node.

[0186] The embodiment of the present application also provides a computer program product including instructions. The computer program product may be a software or program product including instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, the at least one computing device executes a method for providing a container service.

[0187] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center that contains one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the computing device to execute a method for providing a container service.

[0188] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital versatile disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)). It is worth noting that the computer-readable storage medium mentioned in the embodiment of the present application may be a non-volatile storage medium, in other words, a non-transient storage medium.

[0189] It should be understood that the "at least one" mentioned herein refers to one or more, and "multiple" refers to two or more. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first", "second" and the like do not limit the quantity and execution order, and the words "first", "second" and the like do not limit them to be necessarily different.

[0190] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in the embodiments of the present application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0191] The above-mentioned embodiments are provided for the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for providing container services, characterized in that: Applied to a container system, the container system provides a plurality of base images and public images corresponding to the plurality of base images, the public image includes a public part of a plurality of preset images, the plurality of base images include a non-public part of the plurality of preset images, and each base image corresponds to a preset image; the method comprises: Providing a container image selection interface, wherein the container image selection interface is used to instruct a user to select a base image for creating a first container from the multiple base images; Receiving an identifier of a first base image selected by the user from the container image selection interface; Based on the identifier of the first base image, the first base image is used to create the first container, and the public image is mounted in the first container, where the first container is used to provide services for the user.

2. The method according to claim 1, characterized in that The container system includes a distributed cluster, the method is applied to a management node in the distributed cluster, and the distributed cluster also includes a plurality of working nodes; The step of creating the first container using the first base image based on the identifier of the first base image includes: A container creation instruction is sent to a first working node, where the container creation instruction carries an identifier of the first base image, and is used to instruct the first working node to create the first container on the first working node using the first base image based on the identifier of the first base image, where the first working node is one of the multiple working nodes.

3. The method according to claim 2, characterized in that The multiple base images and the common image are stored in a container image repository included in the distributed cluster; The container creation instruction is also used to instruct the first working node to download the first base image from the container image repository based on an identifier of the first base image when the first working node does not store the first base image.

4. The method according to any one of claims 1 to 3, characterized in that: The multiple base images also include user-defined images.

5. The method according to any one of claims 1 to 4, characterized in that: The user has modification authority for some or all of the multiple base images.

6. The method according to claim 5, characterized in that The method further comprises: Providing a container image download interface, wherein the container image download interface is used to instruct the user to select a base image to be downloaded from the multiple base images; Receiving an identifier of a second base image selected by the user from the container image download interface; Based on the identifier of the second base image, downloading the second base image to the local device of the user; Providing a container image production interface, wherein the container image production interface is used to instruct the user to modify the second base image; A third base image uploaded by the user from the container image creation interface is received, where the third base image is a base image obtained by the user modifying the second base image.

7. The method according to any one of claims 1 to 6, characterized in that: The user does not have modification authority for the public image.

8. The method according to any one of claims 1 to 7, characterized in that: The method further comprises: Providing a public image update interface, wherein the public image update interface is used to instruct the container service developer to update the public image; The updated public image is obtained from the public image update interface.

9. The method according to claim 8, characterized in that The public image is stored in a container image repository, and the method further includes: The public image stored in the container image repository is replaced with the updated public image.

10. The method according to any one of claims 1 to 9, characterized in that: The basic image includes an operating system layer image and / or an engine layer image, and the public image includes a business layer image.

11. The method according to any one of claims 1 to 10, characterized in that: The engine layer image includes an artificial intelligence AI engine layer image.

12. The method according to any one of claims 1 to 11, characterized in that: The public image includes one or more of a security reinforcement component, a remote access component, a website service component, a cloud service software development kit SDK, an encryption component, and a decryption component.

13. A method for providing container services, characterized in that: The container system provides multiple base images and public images corresponding to the multiple base images, the public images include public parts of multiple preset images, the multiple base images include non-public parts of the multiple preset images, each base image corresponds to a preset image, the container system includes a distributed cluster, and the method is applied to a first working node in the distributed cluster; the method includes: Receive a container creation instruction, where the container creation instruction carries an identifier of a first base image, where the first base image is one of the multiple base images; Based on the identifier of the first base image, a first container is created using the first base image, and the public image is mounted in the first container, where the first container is used to provide services for users.

14. The method according to claim 13, characterized in that The user has modification authority for some or all of the multiple base images, and / or the user does not have modification authority for the public image.

15. The method according to claim 13 or 14, characterized in that The method further comprises: The container images that meet the aging condition on the first working node are deleted.

16. The method according to claim 15, characterized in that The aging condition includes that the version of the container image is lower than the reference version, and / or the time when the container image was last used exceeds the reference time from the current time.

17. The method according to any one of claims 13 to 16, characterized in that: The basic image includes an operating system layer image and / or an engine layer image, and the public image includes a business layer image.

18. The method according to claim 17, characterized in that The engine layer image includes an artificial intelligence AI engine layer image.

19. A device for providing container services, characterized in that: The device is included in a container system, the container system provides a plurality of base images and public images corresponding to the plurality of base images, the public images include a public part of a plurality of preset images, and the plurality of base images include a non-public part of the plurality of preset images; the device includes: A module is provided, configured to provide a container image selection interface, wherein the container image selection interface is configured to instruct a user to select a base image for creating a first container from the plurality of base images; A receiving module, configured to receive an identifier of a first base image selected by the user from the container image selection interface; A creation module is used to create the first container using the first base image based on the identifier of the first base image, and mount the public image in the first container, wherein the first container is used to provide services for the user.

20. A device for providing container services, characterized in that: The container system provides a plurality of base images and public images corresponding to the plurality of base images, wherein the public image includes a public part of a plurality of preset images, and the plurality of base images include a non-public part of the plurality of preset images. The container system includes a distributed cluster, and the device is included in a first working node in the distributed cluster; the device includes: A receiving module, configured to receive a container creation instruction, wherein the container creation instruction carries an identifier of a first base image, and the first base image is one of the multiple base images; A creation module is used to create a first container using the first base image based on the identifier of the first base image, and to mount the public image in the first container, where the first container is used to provide services for users.

21. A container system, characterized in that: The container system is used to implement the method according to any one of claims 1 to 18.

22. A computing device, characterized in that The computing device includes a processor and a memory; The processor is configured to execute instructions stored in the memory so that the computing device performs the steps of the method according to any one of claims 1 to 18.

23. A computing device cluster, characterized in that: comprising at least one computing device, each computing device comprising a processor and a memory; The processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster performs the steps of the method according to any one of claims 1 to 18.

24. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 18 is implemented.

25. A computer program product, characterized in that The computer program product stores computer instructions, and when the computer instructions are executed by a processor, the steps of the method according to any one of claims 1 to 18 are implemented.

Citation Information

Cited By

  • Method for providing container service, container system, and related apparatus

    WO2025050828A1