The restorer copies layers from the cache into the build container.
During this phase, the restorer looks for layers that could be reused or should be replaced while building the app image.
One of the restorer’s input files are <cache-dir>and <cache-image>to retrieve cache contents, and two of its output files are store.toml and <layer>.toml.
Unless the <skip-layers> flag is passed in as true, the restorer must always perform layer restoration
<group>, if persistent metadata for that buildpack exists in the analysis metadata, the lifecycle must write a toml representation of the persistent metadata to <layers>/<buildpack-id>/store.toml<skip-layers> is true the lifecycle must not perform layer restoration.lifecycle must perform layer restoration for any app image layers or cached layers created by any buildpack present in the provided <group>.<build-image> is provided (optional), the lifecycle:
<build-image> in <analyzed><build-image> to <kaniko-dir>/cachelifecycle:
run-image.reference in <analyzed> and resolve it to a digest referencerun-image.target data in <analyzed> if not present<analyzed> has run-image.extend = true, the lifecycle:
run-image in <analyzed> to <kaniko-dir>/cacheThe lifecycle must use the provided cache-dir or cache-image to retrieve cache contents. The rules for restoration must be followed when determining how and when to store cache layers.
If the restore phase was successful or there was any error during the process, the output will have one of the following exit codes:
| Exit Code | Result | 
|---|---|
0 | 
          Success | 
11 | 
          Platform API incompatibility error | 
12 | 
          Buildpack API incompatibility error | 
1-10, 13-19 | 
          Generic lifecycle errors | 
40-49 | 
          Restoration-specific lifecycle errors | 
For more information about the restorer, see the Platform API spec.