Skip to content

Commit 64d8139

Browse files
committed
adding section to migrate and use OCI layout format
Signed-off-by: Juan Bustamante <[email protected]>
1 parent f768621 commit 64d8139

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

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

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,30 @@ 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 an application images on disk in OCI format](https://github.com/buildpacks/rfcs/blob/main/text/0119-export-to-oci.md) was added.
65+
66+
Platform must take care of preparing a [local storage](https://github.com/buildpacks/rfcs/blob/main/text/0119-export-to-oci.md#how-it-works) on disk where images are being saved in OCI layout format and passing it through 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+
#### Before executing the lifecycle
77+
78+
Input images required by any phase, like the `run-image`, must be saved on disk in OCI layout format in the local storage previously defined following the
79+
[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.
80+
81+
#### During lifecycle execution
82+
83+
For the phases affected, the feature is enabled using a new flag `-layout` or setting to **true** an environment variable named `CNB_USE_LAYOUT`.
84+
* If the feature is enabled:
85+
* A path to a directory where the images are saved in OCI layout format must be specified, either by setting the flag `-layout-dir` or the environment variable `CNB_LAYOUT_DIR`.
6586

6687
## Base Image Author
6788

0 commit comments

Comments
 (0)