You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* If `-run-image` is provided it must be found in `io.buildpacks.lifecycle.metadata` in either `runImage.image` or `runImage.mirrors`
54
-
*`io.buildpacks.rebasable` must be `true` (see below)
54
+
*`io.buildpacks.rebasable` must be `true` (see image extensions below)
55
55
56
56
### Run image extensions is supported (experimental)
57
57
58
-
In Platform 0.12 extensions can be used to extend not only build-time base images, but runtime base images as well.
59
-
60
-
TODO
58
+
In Platform 0.12, extensions can be used to extend not only build-time base images, but runtime base images as well.
59
+
60
+
To use the feature, platforms should:
61
+
* Invoke `analyzer` as usual for Platform 0.12
62
+
* Invoke `detector` with the `-run` flag, to specify the location of a `run.toml` file containing run image information
63
+
* When extensions switch the run image, this is used to log a warning if the new run image is not a known run image
64
+
* Invoke `restorer` with the `-dameon` flag (newly added in this Platform API version) if the export target is a daemon
65
+
* When extensions switch the run image, the `restorer` must re-read target data from the new run image in order to provide this information to buildpacks; if `-daemon` is provided the `restorer` will look for the run image in a daemon instead of a registry
66
+
* When extensions extend the run image, the `-daemon` flag has no effect as the `restorer` must be able to pull the run image manifest from a registry
67
+
* Invoke `extender` as usual to extend the builder image (see [migration guide](TODO) for Platform 0.10)
68
+
* Inspect the contents of `analyzed.toml` - if `run-image.extend` is `true` we must run the `extender` on the run image
69
+
* Using the **run image** as the basis for the container, invoke `extender` with flags `-kind run` and `-extended <extended dir>`
70
+
*`<extended dir>` is the directory where layers from applying each `run.Dockerfile` to the run image will be saved for use by the `exporter`; it defaults to `<layers>/extended`
71
+
* Invoke `exporter` with the `-extended` flag
72
+
73
+
Note that unlike buildpack-provided layers, layers from extensions may NOT be safe to rebase.
74
+
The `io.buildpacks.rebasable` label on the exported application image will be `false` if rebase is unsafe.
75
+
The `-force` flag must be provided to the `rebaser` in order to rebase images with unsafe extension layers,
76
+
and should be used with great care.
61
77
62
78
### OCI layout is a supported export format (experimental)
63
79
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.
80
+
Platform 0.12 adds 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).
81
+
82
+
#### Before build
65
83
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.
84
+
To use the feature, platforms must prepare a [layout directory](https://github.com/buildpacks/rfcs/blob/main/text/0119-export-to-oci.md#how-it-works) containing input images (`<run-image>` or `<previous-image>` if available) in OCI layout format,
85
+
following the [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 image reference to a path.
86
+
87
+
#### During build
67
88
68
-
#### Lifecycle phases affected
89
+
The feature is enabled by providing a `-layout` flag or by setting the `CNB_USE_LAYOUT` environment variable to `true` for the following lifecycle phases:
69
90
70
-
The lifecycle phases affected by this new behavior are:
**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
96
+
Additionally, the path to the layout directory must be specified, either by providing a `-layout-dir` flag or by setting the `CNB_LAYOUT_DIR` environment variable.
84
97
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.
98
+
**Note**: [Rebasing](https://buildpacks.io/docs/concepts/components/lifecycle/rebase/) an image exported to OCI layout format
99
+
and extending OCI layout base images with Dockerfiles are currently not supported.
Copy file name to clipboardExpand all lines: content/docs/reference/spec/migration/platform-api-0.9-0.10.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,11 +71,11 @@ Note: image extensions are not supported for Windows container images.
71
71
* To create a builder with extensions, ensure the `pack` version in use is at least `0.28.0` and enable experimental features: `pack config experimental`.
72
72
* Enable experimental features in the lifecycle by setting `CNB_EXPERIMENTAL_MODE=warn` or `CNB_EXPERIMENTAL_MODE=silent` in the lifecycle execution environment for ALL lifecycle phases
73
73
* Invoke `analyzer` as usual
74
-
* Invoke `detector` with a new optional argument: `-generated`, to specify the directory where Dockerfiles generated by image extensions will be output (defaults to `<layers>/generated`) and include image extensions in `order.toml`
74
+
* Invoke `detector` with a new optional flag: `-generated`, to specify the directory where Dockerfiles generated by image extensions will be output (defaults to `<layers>/generated`) and include image extensions in `order.toml`
75
75
* Dockerfiles for customizing the build image can be found in `<generated>/build/<image extension ID>/Dockerfile`
76
76
* Dockerfiles for customizing the run image can be found in `<generated>/run/<image extension ID>/Dockerfile`
77
77
* The new run image will be written to `analyzed.toml`
78
-
* Invoke `restorer` with a new required argument (when using extensions): `-build-image`, a tag reference to the builder image in use
78
+
* Invoke `restorer` with a new required flag (when using extensions): `-build-image`, a tag reference to the builder image in use
79
79
* A new volume mount is introduced with target `/kaniko`; this volume must be writable by the `restorer` user
80
80
* Invoke `extender` (new lifecycle binary), instead of `builder`; the extender will use kaniko to apply the relevant generated Dockerfiles to the build image and then drop privileges to run the `build` phase
81
81
* The same volume from `restore` should be mounted at `/kaniko`
0 commit comments