Skip to content

Commit 6e17e0b

Browse files
author
Natalie Arellano
authored
Merge pull request cds-hooks#612 from jjbustamante/platform/migration
Adding section to migrate and use OCI layout format
2 parents f768621 + f9fa4ba commit 6e17e0b

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

content/docs/reference/spec/migration/platform-api-0.11-0.12.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,32 @@ In Platform 0.12 extensions can be used to extend not only build-time base image
5959

6060
TODO
6161

62-
### OCI layout is a supported export format
62+
### OCI layout is a supported export format (experimental)
6363

64-
TODO
64+
In Platform 0.12, a new capability to [export application images on disk in OCI layout format](https://github.com/buildpacks/rfcs/blob/main/text/0119-export-to-oci.md) was added.
65+
66+
Platform must prepare a [layout directory](https://github.com/buildpacks/rfcs/blob/main/text/0119-export-to-oci.md#how-it-works) containing input images in OCI layout format, and provide the location of the directory to the lifecycle.
67+
68+
#### Lifecycle phases affected
69+
70+
The lifecycle phases affected by this new behavior are:
71+
- [Analyze](https://buildpacks.io/docs/concepts/components/lifecycle/analyze/)
72+
- [Restore](https://buildpacks.io/docs/concepts/components/lifecycle/restore/)
73+
- [Export](https://buildpacks.io/docs/concepts/components/lifecycle/export/)
74+
- [Create](https://buildpacks.io/docs/concepts/components/lifecycle/create/)
75+
76+
**Note** [Rebasing](https://buildpacks.io/docs/concepts/components/lifecycle/rebase/) an image exported to OCI layout format is not supported.
77+
78+
#### Before executing the lifecycle
79+
80+
Input images required by any phase, like the `run-image` or `previous-image`, must be saved on disk in OCI layout format in the layout directory following the
81+
[rules](https://github.com/buildpacks/spec/blob/platform/v0.12/platform.md#map-an-image-reference-to-a-path-in-the-layout-directory) to convert the reference to a path.
82+
83+
#### During lifecycle execution
84+
85+
For the phases affected, the feature is enabled by providing a new `-layout` flag or by setting the `CNB_USE_LAYOUT` environment variable to `true`.
86+
* If the feature is enabled:
87+
* A path to a directory where the images are located and saved must be specified, either by providing a `-layout-dir` flag or by setting the `CNB_LAYOUT_DIR` environment variable.
6588

6689
## Base Image Author
6790

0 commit comments

Comments
 (0)