Container image management
AssigneeInternational Business Machines Corporation
InventorsLu Yan Li, Zhan Peng Huo, Fei Tan, Jiu Chang Du
Life of this patent
Estimating the term…
Abstract
Methods, systems, and computer program products for container image management are disclosed. In a method, a first group of operations that are performed in respective layers in a base image are obtained. A second group of operations that are performed in respective layers not comprised in the base image are obtained. The second group of operations are optimized based on a comparison between the first and second groups of operations. A destination container image is generated based on the optimized second group of operations and the base image.
Claims17
A method comprising:
- obtaining, by one or more processors, a first group of operations that are performed in respective layers comprised in a base image;
- obtaining, by one or more processors, a second group of operations that are performed in respective layers not comprised in the base image;
- optimizing, by one or more processors, the second group of operations based on a comparison between the first and second groups of operations;
- in response to an operation of the second group of operations being repeated within the first group of operations, classifying, by one or more processors, the operation into a first type or a second type, the first type representing an operation changing the destination container image, and the second type representing an operation not changing the destination container image;
- in response to the operation being classified as the first type, comparing, by one or more processors, the operation with the first group of operations;
- in response to the operation being classified as the second type, deleting, by one or more processors, the operation from the second group;
- and
- generating, by one or more processors, a destination container image based on the optimized second group of operations and the base image.
A computer program product comprising:
- one or more computer-readable storage media and program instructions stored on the one or more computer-readable storage media, the program instructions comprising:
- program instructions to obtain a first group of operations that are performed in respective layers comprised in a base image;
- program instructions to obtain a second group of operations that are performed in respective layers not comprised in the base image;
- program instructions to optimize the second group of operations based on a comparison between the first and second groups of operations;
- program instructions, in response to an operation of the second group of operations being repeated within the first group of operations, to classify the operation into a first type or a second type, the first type representing an operation changing the destination container image, and the second type representing an operation not changing the destination container image;
- program instructions, in response to the operation being classified as the first type, to compare the operation with the first group of operations;
- program instructions, in response to the operation being classified as the second type, to delete the operation from the second group;
- and
- program instructions to generate a destination container image based on the optimized second group of operations and the base image.
A computer system comprising:
- one or more computer processors;
- one or more computer readable storage media;
- and
- program instructions stored on the computer readable storage media for execution by at least one of the one or more processors, the program instructions comprising:
- program instructions to obtain a first group of operations that are performed in respective layers comprised in a base image;
- program instructions to obtain a second group of operations that are performed in respective layers not comprised in the base image;
- program instructions to optimize the second group of operations based on a comparison between the first and second groups of operations;
- program instructions, in response to an operation of the second group of operations being repeated within the first group of operations, to classify the operation into a first type or a second type, the first type representing an operation changing the destination container image, and the second type representing an operation not changing the destination container image;
- program instructions, in response to the operation being classified as the first type, to compare the operation with the first group of operations;
- program instructions, in response to the operation being classified as the second type, to delete the operation from the second group;
- and
- program instructions to generate a destination container image based on the optimized second group of operations and the base image.
Dependencies are inferred from the claim text.