-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Natalie Arellano <[email protected]>
- Loading branch information
1 parent
7cccb44
commit 6d4cd9f
Showing
25 changed files
with
500 additions
and
330 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,7 +26,7 @@ jobs: | |
- name: Install pack | ||
uses: buildpacks/github-actions/[email protected] | ||
with: | ||
pack-version: '0.30.0-rc1' # FIXME: update to 0.30.0 when available | ||
pack-version: '0.31.0-rc1' # FIXME: update to 0.31.0 when available | ||
- name: Test | ||
run: make test | ||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
+++ | ||
title="Build image" | ||
weight=1 | ||
+++ | ||
|
||
## What is a build image? | ||
|
||
The **build image** provides the base image from which the build environment is constructed. | ||
The build environment is the containerized environment in which the [lifecycle][lifecycle] (and thereby [buildpacks][buildpack]) are executed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
+++ | ||
title="Run image" | ||
weight=2 | ||
+++ | ||
|
||
## What is a run image? | ||
|
||
The **run image** provides the base image for application images. | ||
The lifecycle requires a reference to a run image and (where necessary) possible run image mirrors in order to construct the application image. | ||
|
||
### Run image mirrors | ||
|
||
Run image mirrors provide alternate locations for run images, for use during `build` or `rebase`. | ||
When running `build` with a builder containing run image mirrors, `pack` will select a run image | ||
whose registry location matches that of the specified app image (if no registry host is specified in the image name, | ||
DockerHub is assumed). This is useful when publishing the resulting app image (via the `--publish` flag or via | ||
`docker push`), as the app's base image (i.e. run image) will be located on the same registry as the app image itself, | ||
reducing the amount of data transfer required to push the app image. | ||
|
||
In the following example, assuming a builder configured with the example TOML above, the selected run image will be | ||
`registry.example.com/example/run`. | ||
|
||
```bash | ||
$ pack build registry.example.com/example/app | ||
``` | ||
|
||
while naming the app without a registry specified, `example/app`, will cause `example/run` to be selected as the app's | ||
run image. | ||
|
||
```bash | ||
$ pack build example/app | ||
``` | ||
|
||
> For local development, it's often helpful to override the run image mirrors in a builder. For this, the | ||
> `pack config run-image-mirrors` command can be used. This command does not modify the builder, and instead configures the | ||
> local environment. | ||
> | ||
> To see what run images are configured for a builder, the | ||
> `builder inspect` command can be used. `builder inspect` will output built-in and locally-configured run images for | ||
> a given builder, along with other useful information. The order of the run images in the output denotes the order in | ||
> which they will be matched during `build`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
+++ | ||
title="Targets" | ||
weight=4 | ||
+++ | ||
|
||
The concept of "targets" is used to identify compatibility between buildpacks and base images. | ||
|
||
Target data includes: | ||
* Operating system name (e.g., "linux") | ||
* Architecture (e.g., "amd64", "arm64") | ||
* Architecture variant | ||
* Operating system distribution name (e.g., "ubuntu", "alpine") | ||
* Operating system distribution version (e.g., "22.04", "3.18.3") | ||
|
||
For Linux-based images, operating system distribution name and version should be the values in `/etc/os-release` (`$ID` and `$VERSION_ID`). | ||
For Windows-based images, operating system distribution name is blank, and version should be the value of `os.version` in the image config (e.g., `10.0.14393.1066`). | ||
|
||
Buildpacks may declare the targets they are compatible with in `buildpack.toml`. | ||
This information will be used by `pack` (or other platforms) and the lifecycle to avoid running buildpacks on images they aren't designed to work with. | ||
|
||
Additionally, during builds this information will be read by the lifecycle from the run image and exposed to buildpacks through `CNB_TARGET_` environment variables: | ||
* `CNB_TARGET_OS` | ||
* `CNB_TARGET_ARCH` | ||
* `CNB_TARGET_ARCH_VARIANT` | ||
* `CNB_TARGET_DISTRO_NAME` | ||
* `CNB_TARGET_DISTRO_VERSION` | ||
|
||
Buildpacks can use this information to modify their behavior depending on the target. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.