CN114443076A - Mirror image construction method, device, equipment and storage medium - Google Patents

Mirror image construction method, device, equipment and storage medium Download PDF

Info

Publication number
CN114443076A
CN114443076A CN202210114186.8A CN202210114186A CN114443076A CN 114443076 A CN114443076 A CN 114443076A CN 202210114186 A CN202210114186 A CN 202210114186A CN 114443076 A CN114443076 A CN 114443076A
Authority
CN
China
Prior art keywords
mirror image
configuration information
image
target
image construction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210114186.8A
Other languages
Chinese (zh)
Inventor
王玉振
章志军
尚传帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202210114186.8A priority Critical patent/CN114443076A/en
Publication of CN114443076A publication Critical patent/CN114443076A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances

Abstract

The disclosure provides a mirror image construction method, a mirror image construction device, mirror image construction equipment and a storage medium, and relates to the technical field of computers, in particular to the technical fields of containers, cloud services and the like. The specific technical scheme comprises the following steps: acquiring environment configuration information of a target operation environment; based on the environment configuration information, acquiring mirror image configuration information for constructing a target mirror image through a pre-installed mirror image construction tool; and constructing the target mirror according to the mirror configuration information. The technical scheme disclosed by the invention can meet the requirement of locally constructing the mirror image without being limited by network communication, and has a wide application range.

Description

Mirror image construction method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to the field of container and cloud services, and in particular, to a method, an apparatus, a device, and a storage medium for constructing a mirror image.
Background
In the technical fields of containers, cloud services and the like, when an image is built locally, a basic image is generally downloaded from an official image warehouse, and then other images are built on the basis of the basic image. However, in some special scenarios, for example, when network communication is limited, the base image cannot be downloaded from the official image repository, and further, other images cannot be constructed.
Disclosure of Invention
The disclosure provides a mirror image construction method, a mirror image construction device, mirror image construction equipment and a storage medium.
According to a first aspect of the present disclosure, there is provided a mirror image construction method, including:
acquiring environment configuration information of a target operation environment;
acquiring mirror image configuration information based on environment configuration information, wherein the mirror image configuration information is used for constructing a target mirror image through a pre-installed mirror image construction tool;
and constructing the target mirror according to the mirror configuration information.
According to a second aspect of the present disclosure, there is provided an image construction apparatus including:
the first information acquisition module is used for acquiring environment configuration information of a target operation environment;
the second information acquisition module is used for acquiring mirror image configuration information for constructing a target mirror image through a pre-installed mirror image construction tool based on the environment configuration information;
and the mirror image construction module is used for constructing the target mirror image according to the mirror image configuration information.
According to a third aspect of the present disclosure, there is provided an electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the image construction method provided by any of the embodiments of the present disclosure.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to execute the image construction method provided by any one of the embodiments of the present disclosure.
According to a fifth aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the image construction method provided by any of the embodiments of the present disclosure.
The technical scheme of the disclosure can at least realize the following beneficial effects:
based on the pre-installed mirror image construction tool, the requirement of constructing the mirror image locally can be met after the relevant information for constructing the target mirror image is obtained and the target mirror image is constructed, and the method is not limited by network communication and has wide application range.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is a schematic flowchart of a mirror image construction method provided in an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of configuration indication information for configuring operating system types in an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of configuration indication information for configuring processor architecture types in an embodiment of the disclosure;
FIG. 4 is a schematic diagram of configuration indication information for configuring a scripting language type in an embodiment of the present disclosure;
FIG. 5 is a schematic flow chart diagram of another mirror image construction method provided by the embodiments of the present disclosure;
FIG. 6 is a schematic structural framework diagram of a mirror image construction apparatus provided in an embodiment of the present disclosure;
fig. 7 is a schematic structural framework diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure and other processing of the personal information of the related user are all in accordance with the regulations of related laws and regulations and do not violate the good customs of the public order.
In the description of the embodiments of the present disclosure, it should be understood that the terms "first", "second", and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicit indication of the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of the present disclosure, "a plurality" means two or more unless otherwise specified.
It should be further understood that the term "and/or" as used in connection with embodiments of the present disclosure includes all or any and all combinations of one or more of the associated listed items.
It will be understood by those of ordinary skill in the art that, unless otherwise defined, all terms (including technical and scientific terms) used in the embodiments of the present disclosure have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs.
First, a description will be given of several terms related to the embodiments of the present disclosure:
container (container) technique: a lightweight virtualization technique that effectively partitions resources of a single operating system into isolated groups to better balance conflicting resource usage requirements among the isolated groups, with one application running in each container, and with different containers isolated from each other. Container technology has become a widely accepted way of sharing server resources, and docker technology is a typical container technology at present.
Mirror (image): the special file system obtained by standardized encapsulation of the application program and the operating environment thereof can directly run in any operating system provided with the container, can provide resources required by the operation of the container, and is the basis for the operation of the container.
Mirror image warehouse: the warehouses for storing the mirror images in a centralized mode are divided into public warehouses (such as docker official mirror image warehouses) and private warehouses (such as hardor mirror image warehouses).
The inventor of the present disclosure finds in research that, at present, the way of locally constructing the mirror image mainly includes: downloading a base image in an official image repository, generating an application container on the basis of the base image, and executing an image construction instruction in the application container to construct an image.
The above construction has the following drawbacks: for enterprises which can only use an internal network but not an external network, the basic mirror image of an external official mirror image warehouse cannot be downloaded; the method of constructing the mirror image inside the container can construct the environment of the container into the mirror image, which results in a complex construction method and a large volume of the constructed mirror image.
The following describes the technical solutions of the present disclosure and how to solve the above technical problems in detail with specific embodiments.
According to an embodiment of the present disclosure, there is provided a mirror image construction method, as shown in fig. 1, the method including:
s101, obtaining environment configuration information of the target operation environment.
And S102, acquiring mirror image configuration information for constructing the target mirror image through a pre-installed mirror image construction tool (or called a scaffold tool) based on the environment configuration information.
S103, constructing the target mirror according to the mirror configuration information.
The mirror image construction method provided by the disclosure is based on the mirror image construction tool which is installed in advance, the related information for constructing the target mirror image is obtained, the target mirror image is constructed, the requirement of constructing the mirror image locally can be met, the limitation of network communication is avoided, and the application range is wide.
The image construction tool in the embodiment of the present disclosure may provide an image construction instruction for constructing an image, such as a first image construction instruction, a second image construction instruction, and the like, and the image construction tool may be configured to download environment configuration information required for constructing an image.
The image construction tool may be compiled using any of a variety of scripting languages, which may include nodejs, golang, java, etc. In one example, when the nodejs compilation image build tool is employed, the image build tool may be the npm package tool (nodejs 'package manager), which npm package tool may allow a user to download someone else's written packages or command line programs from the server to local use, and may allow a user to upload their own written packages or command line programs to the npm server.
The installation mode of the image construction tool can be local installation or global installation. In the local installation mode, the mirror image construction tool can be installed in a directory, and when the mirror image construction tool is used, corresponding commands need to be executed under the directory to use the mirror image construction tool; in the global installation mode, the image building tool can be used by executing corresponding commands in any directory. The specific installation mode can be selected according to actual requirements, and the method is not limited by the disclosure.
In an optional implementation manner, the environment configuration information in the embodiment of the present disclosure includes: the operating system type, the processor architecture type corresponding to the operating system and the scripting language type. In this embodiment, the image construction method provided by the embodiment of the present disclosure can support image construction under various operating system custom types, various processor architecture types, and various scripting language types.
In other embodiments, the environment configuration information in the embodiments of the present disclosure may further include: and acquiring information of other required target operating environments, such as an agent address of a file to be downloaded, wherein the agent address can be an agent of any country according to actual requirements, and the disclosure does not limit the information.
In an optional implementation manner, in step S101, obtaining environment configuration information of the target operating environment includes: responding to the acquired first mirror image construction instruction, and outputting configuration indication information for configuring the environment configuration information of the target operating environment; and acquiring the environment configuration information of the target operating environment in response to the acquired configuration instruction aiming at the configuration indication information. The implementation method can improve the interactivity of the configuration stage of the environment configuration information and obtain the environment configuration information meeting the requirements of users.
In one example, the first image build instruction may be an init command provided by the image build tool, which may be triggered based on input from a user after the image build tool is installed.
In an example, the configuration indication information may be an information list including a plurality of selectable environment configuration information, for example, an information list including information a, information B, and information C, and the configuration instruction may be an instruction generated by a user after selecting and inputting each selectable information in the information list, for example, a corresponding configuration instruction may be generated after the user selects information a. In another example, the configuration indication information may be prompt information for prompting the user for input, such as "please input environmental configuration information. In other examples, the configuration indication information may include both the information list and the prompt information, and in this case, the prompt information may be "please select environment configuration information".
In a case that the environment configuration information includes an operating system type, a processor architecture type corresponding to the operating system, and a scripting language type, acquiring the environment configuration information of the target operating environment may include:
responding to the acquired first mirror image construction instruction, and sequentially executing the following configuration operations on the operating system type, the processor architecture type corresponding to the operating system and the script language type according to a specified sequence: outputting configuration indication information for configuring a current type to be configured (one of the system type, the architecture type and the scripting language type); and responding to the acquired configuration instruction aiming at the configuration indication information, and acquiring the current type to be configured.
In one example, the specified order may be the following order: an operating system type, a processor architecture type, a scripting language type.
Referring to fig. 2, configuration indication information for configuring an operating system type may be first output, the configuration indication information including: the information list comprises information lists of different operating system types and prompt information for prompting a user to select the operating system type, and the user can select the operating system type in the information list according to the prompt information. The two operating system types of a CentOS (community enterprise operating system, a free, open-source, and redistributable open-source operating system) and a Ubuntu (unibrave, Linux operating system based on desktop application) shown in fig. 2 are only used as examples, and in an actual application scenario, other operating system types may be also shown, which is not limited by the present disclosure. Fig. 2 shows "please select system type: the (Use arrow keys) "is only an example of the prompt message, and in an actual application scenario, other prompt messages related to selecting the operating system type may also be presented, which is not limited in this disclosure.
Referring to fig. 3, after the operating system type is selected, configuration indication information for configuring a processor architecture type corresponding to the operating system may be output, where the configuration indication information includes: the information list comprises information lists of different processor architecture types and prompt information prompting a user to select the processor architecture type, and the user can select the processor architecture type in the information list according to the prompt information. The three processor architecture types x86_64, ARM64(aarch64) and IBM Power (ppc64le) shown in fig. 3 are only examples, and in an actual application scenario, other processor architecture types may also be shown, and the disclosure is not limited thereto. FIG. 3 shows "please select a system architecture type: the (Use arrow keys) "is merely an example of the hint information, and in an actual application scenario, the hint information of other contents related to selecting the processor architecture type may also be presented, which is not limited by the present disclosure.
Referring to fig. 4, after the processor architecture type is selected, configuration indication information for configuring the script language type may be output, and the configuration indication information includes: the information list comprises information lists of different scripting language types and prompt information prompting a user to select the scripting language type, and the user can select the scripting language type in the information list according to the prompt information. The three Nodejs versions of v14, v16 and v8 shown in fig. 4 are only examples of the scripting language type, and in an actual application scenario, other scripting language types may also be presented, which is not limited by the present disclosure. The "please select Nodejs version (Use arrow keys)" shown in fig. 4 is only an example of the prompt message, and in an actual application scenario, other prompt messages related to selecting the script language type may also be presented, which is not limited in this disclosure.
In another example, the above-mentioned specified order may be the following order: the specific configuration operations of the scripting language type, the operating system type, and the processor architecture type are similar to those shown in fig. 2 to 4, and are not described herein again.
Optionally, after the obtaining of the environment configuration information is completed, mirror image configuration information for constructing the target mirror image may be automatically obtained based on the environment configuration information. The mirror configuration information in the embodiments of the present disclosure may include: and installing a file by using the source code corresponding to the environment configuration information, wherein the file can be downloaded by an installed mirror image construction tool and stored in a specified folder.
Under the condition that the environment configuration information comprises an operating system type, a processor architecture type and a scripting language type corresponding to the operating system, the mirror image construction tool can download an operating system source code installation package and a scripting language source code installation package (such as a nodjs source code installation package) of the operating system type, the processor architecture type and the scripting language type, and the operating system source code installation package and the scripting language source code installation package are jointly used as source code installation files corresponding to the environment configuration information.
The specified folder may be a pre-created folder for building the target image, such as a folder created when the first image build instruction is executed. In one example, in response to the first image build instruction being obtained, before obtaining image configuration information for building the target image based on the environment configuration information, a name of the specified folder may be initialized, for example, the name of the specified folder may be updated to an item name of the target image.
The target mirror image which can be applied to the target operation environment can be generated in a targeted manner based on the source code installation file corresponding to the environment configuration information, and other redundant files or information except the environment configuration information does not exist, so that the target mirror image can be purified and controlled, and the size is smaller.
Optionally, in step S103, constructing the target image according to the image configuration information, including: and in response to the acquired second image construction instruction, copying the source code installation file into the target image and operating the source code installation file. This embodiment facilitates more targeted generation of the target image without being affected by other images.
In an example, when the downloaded source code installation file is stored in the designated folder, an image description file (dockerfile) including a docker build command (as a second image building instruction) may be generated, and after the docker build command is executed, the image description file may copy the source code installation file in the target image and run the source code installation file.
In one example, the file content of the image description file may include (taking Nodejs as an example): copying a source code installation file stored on the current host equipment into a target mirror image and decompressing; an identification of a designated container runtime; migrating the folder; deleting the folder after the Nodejs source code installation package is analyzed; setting an environment variable and appointing a path of Nodejs; setting npm a mounting mirror image source of a tool, wherein the mirror image source can be arbitrarily designated; globally install pm2 (process daemon for Nodejs services); the system terminal (i.e., the current host device) is operated.
The target image in the embodiment of the present disclosure may be a basic image or a service image, and the embodiment of the present disclosure does not limit the type of the target image. When the target mirror image is the basic mirror image, the mirror image construction method provided by the embodiment of the disclosure can construct the basic mirror image locally without being limited by network communication, and more mirror images can be constructed on the basis of the basic mirror image; when the target mirror image is the service mirror image, the mirror image construction method provided by the embodiment of the disclosure can directly construct the service mirror image without generating an application container on the basis of the base mirror image and constructing the mirror image in the application container, thereby simplifying the construction process and reducing the volume of the constructed service mirror image.
In an optional implementation manner, the above mirror image constructing method provided by the present disclosure further includes: and storing the target image in a local image warehouse or an external image warehouse.
The constructed target mirror image can be pushed to any local or external mirror image warehouse, can be a mirror image warehouse under the internal network architecture of the current enterprise, and can also be a mirror image warehouse under the network architecture of other external enterprises, so that the use requirements of the local mirror image and the external mirror image can be met, and the application range is wide.
According to an embodiment of the present disclosure, the present disclosure provides a mirror image constructing method, as shown in fig. 5, including:
s501, compiling a mirror image construction tool by adopting any script language and installing.
Optionally, the mirror building tool may be compiled using any one of a plurality of scripting languages, which may include nodejs, golang, java, etc. In one example, when the nodejs compilation image build tool is employed, the image build tool may be the npm package tool (nodejs 'package manager), which npm package tool may allow a user to download someone else's written packages or command line programs from the server to local use, and may allow a user to upload their own written packages or command line programs to the npm server. The implementation mode can support the compiling of multiple languages, and further support the mirror image construction of the multiple languages.
And S502, acquiring environment configuration information of the target operation environment.
The step S101 can be referred to for the specific implementation of this step, and is not described herein again.
S503, based on the environment configuration information, acquiring mirror image configuration information for constructing the target mirror image through a pre-installed mirror image constructing tool.
The step S102 can be referred to for the specific implementation of this step, and is not described herein again.
S504, constructing the target mirror image according to the mirror image configuration information.
The step S103 can be referred to for the specific implementation of this step, and is not described herein again.
In an optional implementation manner, the above mirror image constructing method provided by the present disclosure further includes: and storing the target image in a local image warehouse or an external image warehouse.
The constructed target mirror image can be pushed to a local or external any mirror image warehouse, so that the use requirements of the local mirror image and the external mirror image can be met, and the application range is wide.
According to an embodiment of the present disclosure, there is also provided a mirror image constructing apparatus, as shown in fig. 6, including: a first information acquisition module 601, a second information acquisition module 602, and a mirror construction module 603.
The first information obtaining module 601 is configured to obtain environment configuration information of a target operating environment.
A second information obtaining module 602, configured to obtain, based on the environment configuration information, image configuration information for constructing a target image through a pre-installed image construction tool.
And the mirror image construction module 603 is configured to construct a target mirror image according to the mirror image configuration information.
Optionally, the environment configuration information includes: the operating system type, the processor architecture type corresponding to the operating system and the scripting language type.
Optionally, the first information obtaining module 601 includes: an information output unit and an information acquisition unit.
The information output unit is used for responding to the acquired first mirror image construction instruction and outputting configuration indication information for configuring mirror image configuration information of the target operation environment; and the information acquisition unit is used for responding to the acquired configuration instruction aiming at the configuration indication information and acquiring the environment configuration information of the target operating environment.
Optionally, the mirror configuration information includes: and installing a file by using the source code corresponding to the environment configuration information.
Optionally, the mirror image building module 603 is specifically configured to: and in response to the acquired second mirror image construction instruction, copying the source code installation file into the target mirror image and operating the source code installation file.
In an optional embodiment, the mirror image building apparatus provided by the present disclosure further includes: and the compiling and installing module is used for compiling the mirror image construction tool by adopting any script language and installing the mirror image construction tool.
In an optional embodiment, the mirror image building apparatus provided by the present disclosure further includes: and the mirror image storage module is used for storing the target mirror image in a local mirror image warehouse or an external mirror image warehouse.
The functions of the modules and units in the image constructing apparatus provided in the embodiment of the present disclosure may refer to the corresponding descriptions in the foregoing method embodiments, and are not described herein again.
The present disclosure also provides an electronic device, a non-transitory computer readable storage medium, and a computer program product according to embodiments of the present disclosure.
The present disclosure provides an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the image construction method provided by any of the embodiments of the present disclosure.
The present disclosure provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute an image construction method provided in any one of the embodiments of the present disclosure.
The present disclosure provides a computer program product comprising a computer program which, when executed by a processor, implements the image construction method provided by any of the embodiments of the present disclosure.
FIG. 7 illustrates a schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 7, the device 700 comprises a computing unit 701, which may perform various suitable actions and processes according to a computer program stored in a Read Only Memory (ROM)702 or a computer program loaded from a storage unit 708 into a Random Access Memory (RAM) 703. In the RAM703, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM703 are connected to each other by a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Various components in the device 700 are connected to the I/O interface 705, including: an input unit 706 such as a keyboard, a mouse, or the like; an output unit 707 such as various types of displays, speakers, and the like; a storage unit 708 such as a magnetic disk, optical disk, or the like; and a communication unit 709 such as a network card, modem, wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
Computing unit 701 may be a variety of general purpose and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 701 performs the respective methods and processes described above. For example, in some embodiments, the above-described methods may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of a computer program may be loaded onto and/or installed onto device 700 via ROM 702 and/or communications unit 709. When the computer program is loaded into the RAM703 and executed by the computing unit 701, one or more steps of the methods described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured by any other suitable means (e.g., by means of firmware) to perform the above-described method.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (17)

1. A mirror construction method, comprising:
acquiring environment configuration information of a target operation environment;
based on the environment configuration information, acquiring mirror image configuration information for constructing a target mirror image through a pre-installed mirror image construction tool;
and constructing a target mirror image according to the mirror image configuration information.
2. An image construction method according to claim 1, wherein the environment configuration information comprises: the operating system type, the processor architecture type corresponding to the operating system and the scripting language type.
3. The image construction method according to claim 1, wherein the obtaining of the environment configuration information of the target operating environment comprises:
responding to the acquired first mirror image construction instruction, and outputting configuration indication information for configuring mirror image configuration information of the target operation environment;
and acquiring the environment configuration information of the target operating environment in response to the acquired configuration instruction aiming at the configuration indication information.
4. The image construction method according to claim 1 or 2, wherein the image configuration information includes: and the source code installation file corresponding to the environment configuration information.
5. The image construction method of claim 4, wherein the constructing a target image according to the image configuration information comprises:
and in response to the acquired second mirror image construction instruction, copying the source code installation file into a target mirror image and operating the source code installation file.
6. The image construction method according to claim 1 or 2, further comprising:
and compiling the mirror image construction tool by adopting any script language and installing.
7. The image construction method according to claim 1 or 2, further comprising:
and storing the target image in a local image warehouse or an external image warehouse.
8. An image construction apparatus comprising:
the first information acquisition module is used for acquiring environment configuration information of a target operation environment;
the second information acquisition module is used for acquiring mirror image configuration information for constructing a target mirror image through a pre-installed mirror image construction tool based on the environment configuration information;
and the mirror image construction module is used for constructing a target mirror image according to the mirror image configuration information.
9. The image construction apparatus according to claim 8, wherein the environment configuration information includes: the operating system type, the processor architecture type corresponding to the operating system and the scripting language type.
10. The image construction apparatus according to claim 8, wherein the first information acquisition module includes:
the information output unit is used for responding to the acquired first mirror image construction instruction and outputting configuration indication information for configuring mirror image configuration information of the target operation environment;
and the information acquisition unit is used for responding to the acquired configuration instruction aiming at the configuration indication information and acquiring the environment configuration information of the target operating environment.
11. The image construction apparatus according to claim 8 or 9, wherein the image configuration information includes: and the source code installation file corresponding to the environment configuration information.
12. A mirror image construction apparatus according to claim 11,
the mirror image construction module is specifically configured to: and in response to the acquired second mirror image construction instruction, copying the source code installation file into a target mirror image and operating the source code installation file.
13. The image construction apparatus according to claim 8 or 9, further comprising:
and the compiling and installing module is used for compiling the mirror image constructing tool by adopting any script language and installing the mirror image constructing tool.
14. The image construction apparatus according to claim 8 or 9, further comprising:
and the mirror image storage module is used for storing the target mirror image in a local mirror image warehouse or an external mirror image warehouse.
15. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the image construction method of any of claims 1-7.
16. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the image construction method according to any one of claims 1 to 7.
17. A computer program product comprising a computer program which, when executed by a processor, implements the image construction method according to any one of claims 1-7.
CN202210114186.8A 2022-01-30 2022-01-30 Mirror image construction method, device, equipment and storage medium Pending CN114443076A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210114186.8A CN114443076A (en) 2022-01-30 2022-01-30 Mirror image construction method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210114186.8A CN114443076A (en) 2022-01-30 2022-01-30 Mirror image construction method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114443076A true CN114443076A (en) 2022-05-06

Family

ID=81371135

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210114186.8A Pending CN114443076A (en) 2022-01-30 2022-01-30 Mirror image construction method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114443076A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115840588A (en) * 2023-02-14 2023-03-24 北京万里红科技有限公司 Method for manufacturing ISO mirror image based on VScode environment and applied to debian system
CN117032739A (en) * 2023-10-07 2023-11-10 之江实验室 Mirror image generation method, system, storage medium and electronic equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115840588A (en) * 2023-02-14 2023-03-24 北京万里红科技有限公司 Method for manufacturing ISO mirror image based on VScode environment and applied to debian system
CN117032739A (en) * 2023-10-07 2023-11-10 之江实验室 Mirror image generation method, system, storage medium and electronic equipment
CN117032739B (en) * 2023-10-07 2024-01-09 之江实验室 Mirror image generation method, system, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN109976667B (en) Mirror image management method, device and system
EP3822777A1 (en) Methods for processing mini program, and related devices
US20150095759A1 (en) Rendering interpreter for visualizing data provided from restricted environment container
US10887350B2 (en) Method and system for applying compliance policies on private and public cloud
CN114443076A (en) Mirror image construction method, device, equipment and storage medium
US8938712B2 (en) Cross-platform virtual machine and method
CN113934464A (en) Method and device for starting android application in Linux system and electronic equipment
US11294651B2 (en) Code execution method, device, and rendering apparatus
US11934287B2 (en) Method, electronic device and computer program product for processing data
CN112328301B (en) Method and device for maintaining consistency of operating environments, storage medium and electronic equipment
KR20220151585A (en) Business data processing method, apparatus, electronic apparatus, storage media and computer program
JP7010562B2 (en) Wrapping method, registration method, device, rendering device, and program
CN112835568A (en) Project construction method and device
CN116051031A (en) Project scheduling system, medium and electronic equipment
CN110599112A (en) Method and device for developing and maintaining network page
CN114880020A (en) Software development kit management method, related device and computer program product
CN114398023A (en) File generation method and page configuration method and device
CN111813407B (en) Game development method, game running device and electronic equipment
CN113760969A (en) Data query method and device based on elastic search
CN112966201A (en) Object processing method, device, electronic equipment and storage medium
CN112068814A (en) Method, device, system and medium for generating executable file
CN111782248B (en) Updating method and device of terminal application and electronic equipment
CN114327271B (en) Lifecycle management method, apparatus, device and storage medium
US20210342538A1 (en) Processing word segmentation ambiguity
CN116055463A (en) Method and device for realizing open interface

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination