Skip to content

Commit ec777b4

Browse files
Clarify supported buildpack/lifecycle archive types and URI schemes (#863)
* Clarify supported buildpack/lifecycle archive types and URI schemes Signed-off-by: xonas1101 <aarushsingh1305@gmail.com> * Fix Vale style issues: active voice, wrap buildpacks terms, clean grammar Signed-off-by: xonas1101 <aarushsingh1305@gmail.com> * Fix Vale style issues: active voice, wrap buildpacks terms, clean grammar Signed-off-by: xonas1101 <aarushsingh1305@gmail.com> * Fix Vale style issues: active voice, wrap buildpacks terms, clean grammar Signed-off-by: xonas1101 <aarushsingh1305@gmail.com> * Fix Vale style issues: active voice, wrap buildpacks terms, clean grammar Signed-off-by: xonas1101 <aarushsingh1305@gmail.com> * Fix Vale style issues: active voice, wrap buildpacks terms, clean grammar Signed-off-by: xonas1101 <aarushsingh1305@gmail.com> * Fix Vale style issues: active voice, wrap buildpacks terms, clean grammar Signed-off-by: xonas1101 <aarushsingh1305@gmail.com> --------- Signed-off-by: xonas1101 <aarushsingh1305@gmail.com> Co-authored-by: Aidan Delaney <adelaney21@bloomberg.net>
1 parent 6f05215 commit ec777b4

File tree

1 file changed

+40
-26
lines changed

1 file changed

+40
-26
lines changed

content/docs/reference/config/builder-config.md

Lines changed: 40 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ The builder config file is used for creating [builders][builder].
1313
The schema is as follows:
1414

1515
- #### `description` _(string, optional)_
16+
1617
A human-readable description of the builder, to be shown in `builder inspect` output
1718
(run `pack builder inspect -h` for more information).
1819

1920
- #### `buildpacks` _(list, optional)_
20-
A list of buildpacks, each with the following fields:
21+
22+
A list of `buildpacks`, each with the following fields:
2123

2224
- **`id`** _(string, optional)_\
2325
An identifier for the buildpack. Must match ID specified in buildpack's `buildpack.toml` file.
@@ -26,51 +28,52 @@ The schema is as follows:
2628
The version of the buildpack. Must match version specified in buildpack's `buildpack.toml` file.
2729

2830
- **`uri`** _(string)_\
29-
A URL or path to an [archive](#supported-archives), a packaged buildpack (saved as a `.cnb` file), or a directory. If path is relative, it must be relative to the `builder.toml`.
31+
A URL or path to an [archive](#supported-archives), a packaged buildpack (saved as a `.cnb` file), or a directory. If path is relative, it must be relative to the `builder.toml`.
3032

3133
- #### `order` _(list, required)_
32-
A list of buildpack groups. This list determines the order in which groups of buildpacks
33-
will be tested during detection. Detection is a phase of the [lifecycle] where
34-
buildpacks are tested, one group at a time, for compatibility with the provided application source code. The first
35-
group whose non-optional buildpacks all pass detection will be the group selected for the remainder of the build. Each
36-
group currently contains a single required field:
3734

38-
- **`group`** _(list, required)_\
39-
A set of buildpack references. Each buildpack reference specified has the following fields:
35+
A list of buildpack groups. This list determines the order in which the lifecycle tests groups of `buildpacks` during detection. Detection is a phase of the [lifecycle] where the lifecycle tests each `buildpacks` group, one at a time, for compatibility with the provided app source code. The first
36+
group whose non-optional `buildpacks` all pass detection will be the group selected for the remainder of the build. Each group currently contains a single required field:
37+
38+
- **`group`** _(list, required)_\
39+
A set of buildpack references. Each buildpack reference specified has the following fields:
4040

41-
- **`id`** _(string, required)_\
42-
The identifier of a buildpack from the configuration's top-level `buildpacks` list. Buildpacks with the same ID may
43-
appear in multiple groups at once but never in the same group.
41+
- **`id`** _(string, required)_\
42+
The identifier of a buildpack from the configuration's top-level `buildpacks` list. `Buildpacks` with the same ID may
43+
appear in multiple groups at once but never in the same group.
4444

45-
- **`version`** _(string, optional, default: inferred)_\
46-
The version of the buildpack being referred to. This field may be omitted if
47-
exactly one version of the buildpack
48-
occurs in either the top-level `buildpacks` list or those buildpacks' dependencies.
45+
- **`version`** _(string, optional, default: inferred)_\
46+
The version of the buildpack being referred to. This field may be omitted if
47+
exactly one version of the buildpack
48+
occurs in either the top-level `buildpacks` list or in the dependencies of those `buildpacks`.
4949

50-
- **`optional`** _(boolean, optional, default: `false`)_\
51-
Whether this buildpack is optional during detection.
50+
- **`optional`** _(boolean, optional, default: `false`)_\
51+
Whether this buildpack is optional during detection.
5252

5353
- #### `build` _(required)_
54+
5455
Build-time information. It contains the following field:
5556

5657
- **`image`** _(required, string)_\
5758
Image to use as the build-time base
5859

5960
- #### `run` _(required)_
61+
6062
Run-time information. It contains the following:
6163

6264
- **`run.images`** _(list, required)_\
6365
A set of run image references. By default, the first run image specified will be used.
6466
Image extensions (experimental) may be used to switch the run image dynamically at build-time.
6567
Each run image reference has the following:
6668

67-
- **`image`** _(string, required)_\
68-
Image to use as the run-time base
69+
- **`image`** _(string, required)_\
70+
Image to use as the run-time base
6971

70-
- **`mirrors`** _(list, optional)_\
71-
[Mirrors](/docs/for-app-developers/concepts/base-images/run#run-image-mirrors) for the provided image
72+
- **`mirrors`** _(list, optional)_\
73+
[Mirrors](/docs/for-app-developers/concepts/base-images/run#run-image-mirrors) for the provided image
7274

7375
- #### `stack` _(optional, deprecated)_
76+
7477
The stack to use for the builder. See [stack](/docs/for-app-developers/concepts/base-images/stack) concept information for more details.
7578
This field should be specified if it is necessary to maintain compatibility with older platforms.
7679
If specified, the information in this field must be consistent with the `build` and `run` fields (see above).
@@ -89,6 +92,7 @@ The schema is as follows:
8992
[Run image mirrors](/docs/for-app-developers/concepts/base-images/run#run-image-mirrors) for the stack
9093

9194
- #### `lifecycle` _(optional)_
95+
9296
The [lifecycle] to embed into the builder. It must contain **at most one** the following fields:
9397

9498
- **`version`** _(string, optional)_\
@@ -102,7 +106,8 @@ The schema is as follows:
102106
> will not change despite new lifecycle versions being released.
103107
104108
- #### `build.env` _(optional)_
105-
The [[[build.env]]](https://github.com/buildpacks/spec/blob/main/buildpack.md#environment-variable-modification-rules) is used to specify [operator-defined](https://github.com/buildpacks/spec/blob/main/platform.md#operator-defined-variables) build-time environment variables for buildpacks. Set `CNB_BUILD_CONFIG_DIR` in pack's environment to override the default directory (`/cnb/build-config/env`) where environment variable files are stored within the builder.
109+
110+
The [[[build.env]]](https://github.com/buildpacks/spec/blob/main/buildpack.md#environment-variable-modification-rules) is used to specify [operator-defined](https://github.com/buildpacks/spec/blob/main/platform.md#operator-defined-variables) build-time environment variables for `buildpacks`. Set `CNB_BUILD_CONFIG_DIR` in pack's environment to override the default directory (`/cnb/build-config/env`) where environment variable files are stored within the builder.
106111

107112
- **`name`** _(string, required)_\
108113
The name/key of the environment variable.
@@ -111,16 +116,25 @@ The schema is as follows:
111116
The value of the environment variable.
112117

113118
- **`suffix`** _(string, optional)_\
114-
The type of action used to modify the environment variable when end-users or buildpacks define the same name/key, one of [`default`](https://github.com/buildpacks/spec/blob/main/buildpack.md#default), [`override`](https://github.com/buildpacks/spec/blob/main/buildpack.md#override), [`append`](https://github.com/buildpacks/spec/blob/main/buildpack.md#append), or [`prepend`](https://github.com/buildpacks/spec/blob/main/buildpack.md#prepend). Defaults to `default` if this field is omitted. Operator-defined environment variables take precedence over end-user or buildpack-defined environment variables.
119+
The type of action used to modify the environment variable when end-users or `buildpacks` define the same name/key, one of [`default`](https://github.com/buildpacks/spec/blob/main/buildpack.md#default), [`override`](https://github.com/buildpacks/spec/blob/main/buildpack.md#override), [`append`](https://github.com/buildpacks/spec/blob/main/buildpack.md#append), or [`prepend`](https://github.com/buildpacks/spec/blob/main/buildpack.md#prepend). Defaults to `default` if this field is omitted. Operator-defined environment variables take precedence over end-user or buildpack-defined environment variables.
115120

116121
- **`delim`** _(string, optional)_\
117122
The delimiter used to concatenate two or more values for the given `name`.
118123

119-
> The `delim` is required when `suffix` is one of `append` or `prepend`.
124+
> The `delim` is required when `suffix` is one of `append` or `prepend`.
120125
121126
### Supported archives
122127

123-
Currently, when specifying a URI to a buildpack or lifecycle, only `tar` or `tgz` archive types are supported.
128+
A URI to a buildpack or lifecycle can use one of the following sources:
129+
130+
- **Archives:** `.tar` or `.tgz` files, either local or remote.
131+
- **Docker images:** the `docker://` URI scheme.
132+
133+
**Examples**
134+
135+
- `file:///path/to/buildpack.tgz`
136+
- `https://example.com/buildpack.tar`
137+
- `docker://example/buildpack:latest`
124138

125139
[builder]: /docs/for-platform-operators/concepts/builder
126140
[lifecycle]: /docs/for-platform-operators/concepts/lifecycle

0 commit comments

Comments
 (0)