IP Library Granted Patent US 12,260,240
Granted Patent B2
US 12,260,240 · App. 17/475,505 · Granted Mar 25, 2025

Container image file optimization

Inventors: Arie Bregman (Gan Yavne, IL); Steve Mattar (Herzliya, IL)
Assignee: Red Hat, Inc.
G06F9/45558G06F8/63G06F2009/45562
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,260,240
App. No.
17/475,505
Granted
Mar 25, 2025
Kind
B2
Abstract

A method includes analyzing, by a processing device, a set of container images. Each container image of the set of container images is built by executing a container image file having a plurality of lines arranged in accordance with an execution order. The method further includes assigning, by the processing device, a frequency of change to each line of the plurality lines in view of the set of container images, and modifying, by the processing device, the execution order to obtain a set of modified execution orders by reordering execution of at least a subset of the plurality of lines in view of their respective frequencies of change.

Claims (63)

1. A method comprising:

analyzing, by a processing device, a set of container images built in view of a threshold condition selected to provide a sufficient number of container images for the analysis, wherein each container image of the set of container images is built by executing a container image file having a plurality of lines arranged in accordance with an execution order;

assigning, by the processing device, a frequency of change to each line of the plurality of lines in view of the analysis of the set of container images built in view of the threshold condition;

modifying, by the processing device, the execution order to obtain a set of modified execution orders by reordering execution of at least a subset of the plurality of lines in view of their respective frequencies of change; and

building, by the processing device, a new container image by executing the container image file in accordance with a modified execution order in the set of modified execution orders.

2. The method of claim 1 , wherein modifying the execution order further comprises arranging execution of the plurality of lines in ascending order of frequency of change.

3. The method of claim 1 , further comprising:

receiving, by the processing device, an indication of acceptability of the modified execution order in the set of modified execution orders, wherein building the new container image is based on the indication of acceptability.

4. The method of claim 3 , wherein the modified execution order has a most optimal arrangement of the plurality of lines among a set of acceptable execution orders in view of their respective frequencies of change.

5. The method of claim 1 , further comprising:

receiving, by the processing device, an indication of unacceptability of a second modified execution order of the set of modified execution orders;

rejecting, by the processing device, the second modified execution order; and

storing, by the processing device, a rejection record of the second modified execution order.

6. The method of claim 5 , further comprising:

after storing the rejection record, receiving, by the processing device, a second container image file having the plurality of lines arranged in accordance with the execution order; and

rejecting, by the processing device in view of the rejection record, modification of to the execution order with respect to the second container image file.

7. The method of claim 1 , further comprising:

obtaining, by the processing device, the set of container images.

8. A computing system comprising:

a memory; and

a processing device, operatively coupled to the memory, to:

analyze a set of container images built in view of a threshold condition selected to provide a sufficient number of container images for the analysis,

wherein each container image of the set of container images is built by executing a container image file having a plurality of lines arranged in accordance with an execution order;

assign a frequency of change to each line of the plurality of lines of the container image file in view of the analysis of the set of container images built in view of the threshold condition;

modify the execution order to obtain a set of modified execution orders by reordering execution of at least a subset of the plurality of lines in view of their respective frequencies of change; and

build a new container image by executing the container image file in accordance with a modified execution order in the set of modified execution orders.

9. The computing system of claim 8 , wherein to modify the execution order, the processing device is to arrange execution of the plurality of lines in ascending order of frequency of change.

10. The computing system of claim 8 , wherein the processing device is further to:

receive an indication of acceptability of the modified execution order, wherein to build the new container image, the processing device is to build the new container image based on the indication of acceptability.

11. The computing system of claim 10 , wherein the modified execution order has a most optimal arrangement of the plurality of lines among a set of acceptable execution orders in view of their respective frequencies of change.

12. The computing system of claim 8 , wherein the processing device is further to:

receive an indication of unacceptability of a second modified execution order of the set of modified execution orders;

reject the second modified execution order; and

store a rejection record of the second modified execution order.

13. The computing system of claim 12 , wherein the processing device is further to:

after the storage of the rejection record, receive a second container image file having the plurality of lines arranged in accordance with the execution order; and

reject, in view of the rejection record, modification of to the execution order with respect to the second container image file.

14. The computing system of claim 8 , wherein the processing device is further to:

obtain the set of container images.

15. A computing system comprising:

a memory; and

a processing device, operatively coupled to the memory, to:

receive a container image file having a plurality of lines arranged in accordance with an execution order, wherein the container image is associated with a plurality of container images built in view of a threshold condition selected to provide a sufficient number of container images for an analysis of the plurality of container images;

determine, in view of the execution order, that the plurality of lines is not arranged for execution in ascending order of frequency of change;

in response to the determination that the plurality of lines is not arranged in ascending order of frequency of change, modify the execution order to obtain a set of modified execution orders by reordering execution of at least a subset of the plurality of lines in view of their respective frequencies of change; and

build a new container image by executing the container image file in accordance with a modified execution order in the set of modified execution orders.

16. The computing system of claim 15 , wherein to determine that the plurality of lines is not arranged for execution in ascending order of frequency of change, the processing device is to:

analyze the plurality of container images built by executing the container image file; and

assign a frequency of change to each line of the plurality of lines in view of the plurality of container images.

17. The computing system of claim 15 , wherein the processing device is further to:

determine whether a rejection record corresponding to a second modified execution order exists; and

in response to determining that the rejection record exists, reject the second modified execution order.

18. The computing system of claim 17 , wherein prior to the reception of the container image file, the processing device is further to:

analyze a set of container images, wherein each container image of the set of container images is built by executing a second container image file having a second plurality of lines arranged in accordance with the execution order;

assign a frequency of change to each line of the second plurality of lines in view of the set of container images; and

modify the execution order to obtain a second set of modified execution orders including the modified execution order by reordering execution of at least a second subset of the second plurality of lines in view of their respective frequencies of change.

19. The computing system of claim 18 , wherein the processing device is further to:

obtain the set of container images.

20. The computing system of claim 18 , wherein the processing device is further to:

receive an indication of unacceptability of a second modified execution order;

determine that the second modified execution order is unacceptable in view of the indication;

reject the second modified execution order; and

store the rejection record of the second modified execution order.

Assignments (2)
CHANGE OF NAME Recorded Mar 3, 2026
From: RED HAT, INC.
To: RED HAT, LLC
Reel/Frame 074913/0759 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 15, 2021
From: BREGMAN, ARIE; MATTAR, STEVE
To: RED HAT, INC.
Reel/Frame 057488/0376 →
Continuity (1)
Related Publication 20230080518A1 · Mar 16, 2023
References Cited (23)
US 9684561B1 · Yan · 2017 [cited by examiner]
US 10002247B2 · Suarez et al. · 2018 [cited by applicant]
US 10511481B1 · Castellanos · 2019 [cited by examiner]
US 10528337B1 · Varadharajan Kannan · 2020 [cited by examiner]
US 10810003B2 · Gainsborough et al. · 2020 [cited by applicant]
US 10838702B2 · Li et al. · 2020 [cited by applicant]
US 11029975B2 · Prasad et al. · 2021 [cited by applicant]
US 11238009B1 · Dhakras · 2022 [cited by examiner]
US 20170177877A1 · Suarez · 2017 [cited by examiner]
US 20180349150A1 · Wong · 2018 [cited by examiner]
US 20190114164A1 · Wong · 2019 [cited by examiner]
US 20190273655A1 · Jones · 2019 [cited by examiner]
US 20200065118A1 · Nag et al. · 2020 [cited by applicant]
US 20200142680A1 · Varadharajan Kannan · 2020 [cited by examiner]
US 20200241867A1 · Gainsborough · 2020 [cited by examiner]
US 20200409680A1 · Vaddi · 2020 [cited by examiner]
US 20210064412A1 · Yamaguchi · 2021 [cited by examiner]
US 20210103450A1 · Prasad · 2021 [cited by examiner]
US 20220043916A1 · Wolfson · 2022 [cited by examiner]
US 20220283794A1 · Wolfson · 2022 [cited by examiner]
The extended European search report for EP Application No. 21209239.9-1203, issued Apr. 28, 2022, 10 pages. [cited by applicant]
Rivera, Angel, “Tips for optimizing Docker builds”, https://circleci.com/blog/tips-for-optimizing-docker-builds/, Oct. 30, 2020, 10 pages. [cited by applicant]
Sciforce, “Strategies of docker images optimization”, https://medium.com/sciforce/strategies-of-docker-images-optimization-2ca9cc5719b6, Jan. 3, 2020, 13 pages. [cited by applicant]