Patent ID: 11880341
Assignee: BEIJING BAIDU NETCOM SCIENCE TECHNOLOGY CO., LTD.
Field: Computer technology (Electrical engineering)
Classification: CPC G  Y | IPC G

Claim 4:
5. A non-transitory computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, a container image processing method is implemented, and the method comprises:
obtaining required file information for generating a container image, and constructing a complete image according to the required file information;
analyzing the required file information to determine file information with a space occupation greater than a preset threshold;
installing the file information with the space occupation greater than the preset threshold in a specified parent directory of the complete image;
determining the specified parent directory as a specified directory to be deleted of the complete image;
adding a new layer based on the complete image, and replacing the specified directory to be deleted of the complete image with the new layer to obtain a new image;
compressing and merging the new image by applying a Docker Squash compression mechanism to make layers in the new image being merged into one layer to obtain the compressed image;
obtaining directory content of the specified directory to be deleted, and generating content to be mounted based on the directory content of the specified directory to be deleted; and
storing the content to be mounted to a block device file system, adding first mount points on the compressed image, and mounting the compressed image to the block device file system through the first mount points, for automatic mounting when an image is activated, wherein the block device file system is a local disk.