Method, device and equipment for container mirror image construction, and storage medium

A construction method and container technology, which is applied in the computer field, can solve the problem of large space occupied by container images, achieve the effects of reduced size, reduced attack surface, and saved storage space

Active Publication Date: 2020-05-22
安超云软件有限公司
View PDF4 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0010] In order to solve the problem that the container image constructed by the prior art occupies a large space, the present invention proposes a container image construction method, device, equipment and storage medium

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method, device and equipment for container mirror image construction, and storage medium
  • Method, device and equipment for container mirror image construction, and storage medium
  • Method, device and equipment for container mirror image construction, and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0055] refer to figure 1 , this embodiment provides a method for building a container image, including:

[0056] Step S101, receiving a Dockerfile creation instruction, and creating a first Dockerfile according to the Dockerfile creation instruction;

[0057] Step S102, receiving a merging instruction, and merging the running instructions in the first Dockerfile according to the merging instruction;

[0058]Step S103, creating a first container image according to the merged first Dockerfile of the running instructions;

[0059] Step S104, creating a first container according to the first container image;

[0060] Step S105, control to enter the container environment of the first container;

[0061] Step S106, obtaining configuration files and dependent files from the container environment of the first container, and forming compressed files;

[0062] Step S107, controlling to exit the container environment of the first container;

[0063] Step S108, modifying the first Do...

Embodiment 2

[0088] refer to figure 2 , this embodiment provides a device for building a container image, including:

[0089] The creation module 201 is configured to receive a Dockerfile creation instruction, and create a first Dockerfile according to the Dockerfile creation instruction;

[0090] The merging module 202 is configured to receive a merging instruction, and merge the operation instructions in the first Dockerfile according to the merging instruction;

[0091] The first container image creation module 203 is configured to create the first container image according to the merged first Dockerfile of the running instructions;

[0092] A first container creation module 204, configured to create a first container according to the first container image;

[0093] An environment control module 205, configured to control access to the container environment of the first container;

[0094] A file obtaining module 206, configured to obtain configuration files and dependent files from...

Embodiment 3

[0108] refer to image 3, this embodiment provides a container image building device 300, including a processor 301 and a memory 302 connected to the processor 301, the memory 302 stores a plurality of instructions, and the instructions can be loaded and executed by the processor 301, so that The processor can execute the method for building a container image as described in Embodiment 1.

[0109] In addition, this embodiment also provides a storage medium, the storage medium stores a plurality of instructions, and the instructions can be loaded and executed by the processor so that the processor can execute the container image as described in the first embodiment. build method.

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a method, a device and equipment for container mirror image construction, and a storage medium. The method comprises the following steps: receiving a Docker file creation instruction, and creating a first Docker file according to the Docker file creation instruction; combining operation instructions in the first Docker file; creating a first container mirror image accordingto the first Docker file after the operation instruction combination; creating a first container according to the first container mirror image; controlling to enter a container environment of the first container; obtaining a configuration file and a dependent file from the container environment of the first container, and forming a compressed file; controlling to exit the container environment ofthe first container; modifying a basic mirror image in the first Docker file into a scatch empty mirror image, replacing a mirror image operation instruction in the first Docker file with the compressed file, and adding configuration related information to form a second Docker file; and creating a second container mirror image according to the second Docker file. The method can effectively reducethe size of the container mirror image.

Description

technical field [0001] The present invention relates to the field of computer technology, in particular to a method, device, device and storage medium for constructing a container image. Background technique [0002] Container technology (Linux Container) is a lightweight operating system layer virtualization technology. Compared with traditional virtualization (virtual machine) technology, which is cumbersome to transplant and deploy, container technology has extremely light weight, second-level deployment, Easy portability (build once, run everywhere). It can accelerate the application automation process and application deployment operation and maintenance of enterprise products, optimize the utilization rate and cost of enterprise IT infrastructure, and also use container-based microservices to accelerate the modernization process of enterprise application architecture, and comprehensively help the accelerated development of enterprise IT . [0003] A container image is...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/455
CPCG06F9/45558G06F2009/45562G06F2009/45587Y02D10/00
Inventor 毕宏伟
Owner 安超云软件有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products