Command result caching for building application container images
AssigneeRed Hat, Inc.
InventorBoaz Shuster
Life of this patent
Estimating the term…
Abstract
Implementations of the disclosure provide systems and methods for receiving, by a processing device, a request for an application image. A sequence of commands associated with the application image and a value of a parameter associated with the sequence of commands is received. Responsive to determining that the sequence of commands has been previously executed with the value of the parameter, the processing device retrieves, from a cache, a result of executing the sequence with the value of the parameter. The application image is built using the first result of executing the sequence.
Claims20
A method comprising:
- receiving, by a processing device, a request for an application image;
- identifying, by the processing device, a sequence of one or more commands associated with the application image and a value of a parameter associated with the sequence of commands;
- determining whether the sequence has been previously executed with the value of the parameter in view of one or more key values, wherein a first key value of the one or more key values is produced by applying a hash function to at least one command of the sequence and the value of the parameter;
- responsive to determining that the sequence has been previously executed with the value of the parameter, retrieving, from a cache, a result of executing the sequence with the value of the parameter;
- and
- building the application image using the result of executing the sequence.
A system comprising:
- a memory;
- and
- a processing device communicably coupled to the memory, the processing device to:
- receive a request for an application image;
- identify a sequence of one or more commands associated with the application image and a value of a parameter associated with the sequence of commands;
- determine whether the sequence has been previously executed with the value of the parameter in view of one or more key values, wherein a first key value of the one or more key values is produced by applying a hash function to at least one command of the sequence and the value of the parameter;
- responsive to determining that the sequence has been previously executed with the value of the parameter, retrieve, from a cache associated with the memory, a result of executing the sequence with the value of the parameter;
- and
- build the application image using the result of executing the sequence.
A non-transitory computer-readable medium having instructions stored therein that, when executed by a processing device, cause the processing device to:
- receive a request for an application image;
- identify a sequence of one or more commands associated with the application image and a value of a parameter associated with the sequence of commands;
- determine whether the sequence has been previously executed with the value of the parameter in view of one or more key values, wherein a first key value of the one or more key values is produced by applying a hash function to at least one command of the sequence and the value of the parameter;
- responsive to determining that the sequence has been previously executed with the value of the parameter, retrieve, from a cache, a result of executing the sequence with the value of the parameter;
- and
- build the application image using the result of executing the sequence.
Dependencies are inferred from the claim text.