Skip to content

Commit

Permalink
Merge pull request #266 from jimil749/distribution-build-image
Browse files Browse the repository at this point in the history
Distribution Spec (v3) - Build Image Artifact format
  • Loading branch information
sclevine authored Dec 1, 2021
2 parents d3395b2 + 24c2179 commit edaee0c
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion distribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This document specifies the artifact format and the delivery mechanism for the b
- [Artifact Format](#artifact-format)
- [Buildpackage](#buildpackage)
- [Lifecycle](#lifecycle)

- [Build Image](#build-image)
## Distribution API Version

This document specifies Distribution API version `0.3`.
Expand Down Expand Up @@ -155,3 +155,34 @@ Where:
* contain an array of deprecated APIs:
* should only contain `0.x` or major versions
* should only contain APIs that correspond to a spec release
### Build Image

The following defines how a build image SHOULD be packaged for distribution as an OCI Image. The build image is the component that provides the base image from which the build environment is constructed.

The image configuration refers to the OCI Image configuration as mentioned [here](https://github.com/opencontainers/image-spec/blob/main/config.md#properties).

#### Image Configuration

The Build Image MUST contain the following configurations:

* Image Config's `config.User` field MUST be set to the user [](README.md#operating-system-conventions)UID/[](README.md#operating-system-conventions)SID with a writable home directory.
* Image Config's `os` field MUST be set to the underlying operating system used by the build image.
* Image Config's `architecture` field MUST be set to the underlying operating system architecture used by the build image.
* Image Config's `variant` field MUST be set to the underlying architecture variant.

#### Environment Variables

The Build Image MUST contain the following Environment Variables:

* Image Config's `config.Env` field MUST have the environment variable `CNB_USER_ID` set to the user [](README.md#operating-system-conventions)UID/[](README.md#operating-system-conventions)SID of the user specified in the `User` field.
* Image Config's `config.Env` field MUST have the environment variable `CNB_GROUP_ID` set to the primary group [](README.md#operating-system-conventions)GID/[](README.md#operating-system-conventions)SID of the user specified in the `User` field.
* Image Config's `config.Env` field MUST have the environment variable `PATH` set to a valid set of paths or explicitly set to empty (`PATH=`).

#### Labels

The Build Image SHOULD contain the following Labels on the image configuration:

| Label | Description
|------- |------------
| `io.buildpacks.distribution.name` | A string denoting the operating system distribution
| `io.buildpacks.distribution.version` | A string denoting the operating system version

0 comments on commit edaee0c

Please sign in to comment.