Optimization of multi-layered images
Abstract
A method includes, with a computing system, storing a first container image. The first container image may be defined by a first set of layers. The method further includes, with the computing system, storing a second container image, the second container image defined by a second set of layers. The second set of layers has at least one file in common with a file in the first set of layers. The method further includes, with the computing system, performing an analysis of the first set of layers and the second set of layers. The method further includes, with the computing system, using the analysis to create a new set of layers such that both the first container image and the second container image can be derived from the new set of layers.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1. A method performed by a computing system, the method comprising:
with the computing system, storing a first container image in a repository server, the first container image defined by a first set of layers, the first set of layers including a first set of files;
with the computing system, storing a second container image in the repository server, the second container image defined by a second set of layers, the second set of layers including a second set of files, the first set of files and the second set of files having at least one file in common;
with the computing system, performing an analysis of the first set of layers and the second set of layers, the analysis comparing characteristics of files in the first set of layers and files in the second set of layers, wherein the characteristics comprise a name of the file, a file size, a creation date, and a creation time;
with the computing system, and based on the analysis comparing characteristics, identifying one or more files in the first set of layers that are identical to one or more files in the second set of layers;
with the computing system, creating a new set of layers in the repository server such that both the first container image and the second container image can be derived from the new set of layers, the new set of layers comprising at least one new layer that includes at least one of the one or more identical files from layers of both the first container image and the second container image and wherein the creation of the new set of layers includes switching at least one file of the first set of files or the second set of files located in a first layer within the first set of layers or the second set of layers to a second layer within the new set of layers, the second layer being different from the first layer;
with the computing system, providing a first copy of the first container image in the repository server using a first subset of the new set of layers, the first copy including an indication of a hierarchal structure of the files of the new set of layers; and
with the computing system, providing a second copy of the second container image in the repository server using a second subset of the new layers, the second subset being different than the first subset, and the second copy including the indication of a hierarchal structure of the files of the new set of layers.
2. The method of claim 1 , wherein the new set of layers includes a layer having a file from a layer of the first set of layers and a file from the second set of layers.
3. The method of claim 1 , further comprising, receiving a request from a client device for the first container image.
4. The method of claim 3 , further comprising, using the new set of layers to provide the first container image in response to the request.
5. The method of claim 1 , further comprising, receiving a request from a client device for the second container image.
6. The method of claim 5 , further comprising, using the new set of layers to provide the second container image in response to the request.
7. The method of claim 1 , wherein the computing system comprises a database for storing container image layers.
8. The method of claim 1 , wherein the first container image is an Open Containers Initiative OCI image.
9. A method performed by a computing system, the method comprising:
storing a plurality of container images in a repository server, each container image derived from a unique set of layers;
analyzing the sets of layers for each of the plurality of container images, the analyzing comparing characteristics of a first set of files in a first set of layers and a second set of files in a second set of layers, wherein the characteristics comprise a name of the file, a file size, a creation date, and a creation time;
identifying, based on the comparing characteristics, one or more files in the first set of files that are identical to one or more files in the second set of files;
creating a new set of layers in the repository server from which each of the plurality of container images can be built, the new set of layers comprising at least one new layer that includes at least one of the one or more identical files from layers of at least two or more of the plurality of container images, and wherein the creation of the new set of layers includes switching at least one file of the first set of files or the second set of files located in a first layer within the first set of layers or the second set of layers to a second layer within the new set of layers, the second layer being different from the first layer;
providing a first copy of a first container image of the plurality of container images in the repository server using a first subset of the new set of layers, the first copy including an indication of a hierarchal structure of the files of the new set of layers; and
providing a second copy of a second container image of the plurality of container images in the repository server using a second subset of the new layers, the second subset being different than the first subset, and the second copy including the indication of a hierarchal structure of the files of the new set of layers.
10. The method of claim 9 , further comprising, receiving from a client, a request for a first one of the plurality of container images.
11. The method of claim 10 , further comprising, providing the client with the first one of the plurality of container images by utilizing the new set of layers in response to the request.
12. The method of claim 9 , wherein the new set of layers includes one layer having at least two files that are identical to each of the sets of layers for at least two or more of the plurality of container images.
13. The method of claim 9 , wherein the plurality of container images are Open Containers Initiative (OCI) images.
14. A system comprising:
a processor; and
a memory comprising machine readable instructions that when executed by the processor, cause the system to:
store a first container image in a repository server, the first container image defined by a first set of layers, the first set of layers including a first set of files;
store a second container image in the repository server, the second container image defined by a second set of layers, the second set of layers including a second set of files, the second set of layers having at least one layer in common with the first set of layers, and the first set of files and the second set of files having at least one file in common;
perform an analysis of the first set of layers and the second set of layers, the analysis comparing characteristics of files in the first set of layers and files in the second set of layers, wherein the characteristics comprise a name of the file, a file size, a creation date, and a creation time;
identify, based on the analysis comparing characteristics, one or more files in the first set of layers that are identical to one or more files in the second set of layers;
use the analysis to create a new set of layers in the repository server such that both the first container image and the second container image can be derived from the new set of layers, the new set of layers comprising at least one new layer that includes at least one of the one or more identical files from layers of both the first container image and the second container image and wherein the creation of the new set of layers includes switching at least one file of the first set of files or the second set of files located in a first layer within the first set of layers or the second set of layers to a second layer within the new set of layers, the second layer being different from the first layer;
provide a first copy of the first container image in the repository server using a first subset of the new set of layers, the first copy including an indication of a hierarchal structure of the files of the new set of layers; and
provide a second copy of the second container image in the repository server using a second subset of the new layers, the second subset being different than the first subset, and the second copy including the indication of a hierarchal structure of the files of the new set of layers.
15. The system of claim 14 , wherein the new set of layers includes a layer having a file from a layer of the first set of layers and a file from the second set of layers.
16. The system of claim 14 , wherein the system is further to receive a request from a client device for the first container image.
17. The system of claim 16 , wherein the system is further to use the new set of layers to provide the first container image in response to the request.
18. The system of claim 14 , wherein the system is further to receive a request from a client device for the second container image.
19. The system of claim 18 , wherein the system is further to use the new set of layers to provide the second container image in response to the request.
20. The system of claim 14 , wherein the first container image is an Open Containers Initiative OCI image.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.