mirror of https://github.com/buildpacks/spec.git
Compare commits
13 Commits
platform/v
...
main
Author | SHA1 | Date |
---|---|---|
|
d29ba81518 | |
|
bdcac26a7d | |
|
f3fd7555c8 | |
|
f8b60dc65c | |
|
08ee76ee4b | |
|
7f44395c97 | |
|
664e7a0eb3 | |
|
7207c7dd71 | |
|
c995c549f7 | |
|
b341177441 | |
|
7c68e77461 | |
|
87dc65b961 | |
|
551833d3d1 |
|
@ -52,4 +52,4 @@ These documents currently specify:
|
|||
|
||||
- Buildpack API: `0.10`
|
||||
- Distribution API: `0.3`
|
||||
- Platform API: `0.12`
|
||||
- Platform API: `0.14`
|
||||
|
|
|
@ -103,7 +103,7 @@ A **component buildpack** is a buildpack containing `/bin/detect` and `/bin/buil
|
|||
|
||||
A **composite buildpack** is a buildpack containing an order definition in `buildpack.toml`. Composite buildpacks do not contain `/bin/detect` or `/bin/build` executables. They MUST be [resolvable](#order-resolution) into a collection of component buildpacks.
|
||||
|
||||
An **image extension** is a directory containing an `extension.toml`. Extensions generate Dockerfiles that can be used to define the runtime base image, prior to buildpack execution. Extensions implement the [Image Extension Interface](image-extension.md). Extensions are always "component": their `extension.toml` cannot contain an order definition.
|
||||
An **image extension** is a directory containing an `extension.toml`. Extensions generate Dockerfiles that can be used to define the runtime base image, prior to buildpack execution. Extensions implement the [Image Extension Interface](image_extension.md). Extensions are always "component": their `extension.toml` cannot contain an order definition.
|
||||
|
||||
**Resolving an order** is the process by which an order (which may contain image extensions, component buildpacks, or composite buildpacks) is evaluated together with application source code to produce an optional group of image extensions and a required group of component buildpacks that can be used to build the application. This process is known as **detection**. During detection, the `/bin/detect` executable for each image extension (if present) and the `/bin/detect` executable for each component buildpack is invoked.
|
||||
|
||||
|
@ -1108,8 +1108,8 @@ Each target in `targets`:
|
|||
- MUST identify a compatible runtime environment:
|
||||
- `os`, `arch`, and `variant` if provided MUST be valid identifiers as defined in the [OCI Image Specification](https://github.com/opencontainers/image-spec/blob/main/config.md)
|
||||
- `distros` if provided MUST describe the OS distributions supported by the buildpack
|
||||
- For Linux-based images, `distros.name` and `distros.versions` SHOULD contain the values specified in `/etc/os-release` (`$ID` and `$VERSION_ID`), as the `os.version` field in an image config may contain combined distribution and version information
|
||||
- For Windows-based images, `distros.name` SHOULD be empty; `distros.versions` SHOULD contain the value of `os.version` in the image config (e.g., `10.0.14393.1066`)
|
||||
- For Linux-based images, `distros.name` and `distros.version` SHOULD contain the values specified in `/etc/os-release` (`$ID` and `$VERSION_ID`), as the `os.version` field in an image config may contain combined distribution and version information
|
||||
- For Windows-based images, `distros.name` SHOULD be empty; `distros.version` SHOULD contain the value of `os.version` in the image config (e.g., `10.0.14393.1066`)
|
||||
- Any field not provided will be interpreted as `<matches any>`
|
||||
|
||||
If the `targets` list is empty, tools reading `buildpack.toml` will assume:
|
||||
|
|
18
platform.md
18
platform.md
|
@ -98,7 +98,7 @@ Examples of a platform might include:
|
|||
|
||||
## Platform API Version
|
||||
|
||||
This document specifies Platform API version `0.12`.
|
||||
This document specifies Platform API version `0.14`.
|
||||
|
||||
Platform API versions:
|
||||
- MUST be in form `<major>.<minor>` or `<major>`, where `<major>` is equivalent to `<major>.0`
|
||||
|
@ -479,7 +479,8 @@ Usage:
|
|||
[-layers <layers>] \
|
||||
[-log-level <log-level>] \
|
||||
[-skip-layers <skip-layers>] \
|
||||
[-uid <uid>]
|
||||
[-uid <uid>] \
|
||||
[-run <run> ]
|
||||
```
|
||||
|
||||
##### Inputs
|
||||
|
@ -499,11 +500,13 @@ Usage:
|
|||
| `<log-level>` | `CNB_LOG_LEVEL` | `info` | Log Level |
|
||||
| `<skip-layers>` | `CNB_SKIP_LAYERS` | `false` | Do not perform [layer restoration](#layer-restoration) |
|
||||
| `<uid>` | `CNB_USER_ID` | | UID of the build image `User` |
|
||||
|
||||
| `<run>`** | `CNB_RUN_PATH` | `/cnb/run.toml` | Path to run file (see [`run.toml`](#runtoml-toml)) |
|
||||
> ^ Only needed when using image extensions
|
||||
|
||||
> \* Only needed when using image extensions to extend the build image
|
||||
|
||||
> \** Only needed when using image extensions to extend the run image
|
||||
|
||||
##### Outputs
|
||||
|
||||
| Output | Description |
|
||||
|
@ -533,7 +536,7 @@ Usage:
|
|||
- MUST record the digest reference to the provided `<build-image>` in `<analyzed>`
|
||||
- MUST copy the OCI manifest and config file for `<build-image>` to `<kaniko-dir>/cache`
|
||||
- The lifecycle:
|
||||
- MUST resolve `run-image.reference` to a digest reference in `<analyzed>` if not present
|
||||
- MUST [resolve mirrors](#run-image-resolution) for the `run-image.reference` in `<analyzed>` and resolve it to a digest reference
|
||||
- MUST populate `run-image.target` data in `<analyzed>` if not present
|
||||
- **If** `<analyzed>` has `run-image.extend = true`, the lifecycle:
|
||||
- MUST download from the registry and save in OCI layout format the `run-image` in `<analyzed>` to `<kaniko-dir>/cache`
|
||||
|
@ -967,7 +970,7 @@ Usage:
|
|||
- **If** `<force>` is `true` and the provided `<run-image>` is not found in `runImage.image` or `runImage.mirrors`:
|
||||
- `run-image.image` SHALL be the provided `<run-image>`
|
||||
- `run-image.mirrors` SHALL be omitted
|
||||
- **Else if** `<force> is `false`, the provided `<run-image>` MUST be found in `runImage.image` or `runImage.mirrors`
|
||||
- **Else if** `<force>` is `false`, the provided `<run-image>` MUST be found in `runImage.image` or `runImage.mirrors`
|
||||
- To ensure [build reproducibility](#build-reproducibility), the lifecycle:
|
||||
- SHOULD set the `created` time in image config to a constant
|
||||
- The lifecycle SHALL write a [report](#reporttoml-toml) to `<report>` describing the rebased app image
|
||||
|
@ -1570,10 +1573,13 @@ _Deprecated in Platform API 0.12._
|
|||
|
||||
For compatibility with older platforms and older buildpacks, base image authors SHOULD ensure for build images and run images:
|
||||
|
||||
- The image config's `Env` field has the environment variable `CNB_STACK_ID` set to the stack ID.
|
||||
- The image config's `Label` field has the label `io.buildpacks.stack.id` set to the stack ID.
|
||||
- The image config's `Label` field has the label `io.buildpacks.stack.mixins` set to a JSON array containing mixin names for each mixin applied to the image.
|
||||
|
||||
And for build images:
|
||||
|
||||
- The image config's `Env` field has the environment variable `CNB_STACK_ID` set to the stack ID.
|
||||
|
||||
Where `CNB_STACK_ID` SHALL be directly inherited by buildpacks without modification.
|
||||
|
||||
To upgrade, the platform SHOULD upgrade all buildpacks to use Buildpack API `0.10` or greater.
|
||||
|
|
Loading…
Reference in New Issue