Skip to content

Commit d1d0da3

Browse files
author
Natalie Arellano
committed
Formatting fixes
Signed-off-by: Natalie Arellano <[email protected]>
1 parent cbd4dee commit d1d0da3

File tree

6 files changed

+21
-18
lines changed

6 files changed

+21
-18
lines changed

content/docs/for-buildpack-authors/concepts/caching-strategies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ There are three types of layers that can be contributed to an image
1414

1515
* `build` layers -- the directory will be accessible by subsequent buildpacks,
1616
* `cache` layers -- the directory will be included in the cache,
17-
* `launch` layers -- the directory will be included in the run image as a single layer,
17+
* `launch` layers -- the directory will be included in the final app image as a single layer,
1818

1919
In this section we look at caching each layer type.
2020

content/docs/for-buildpack-authors/how-to/write-buildpacks/add-sbom.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
+++
22
title="Provide a Software Bill-of-Materials"
3-
weight=2
3+
weight=5
44
+++
55

66
Buildpacks can provide a [Software `Bill-of-Materials`](https://en.wikipedia.org/wiki/Software_bill_of_materials) (SBOM)

content/docs/for-buildpack-authors/how-to/write-buildpacks/create-layer.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,40 @@
11
+++
22
title="Create dependency layers"
3-
weight=99
3+
weight=3
44
+++
55

6-
Each directory created by the buildpack under the `CNB_LAYERS_DIR` can be used as a layer in the final image or build cache.
6+
Each directory created by the buildpack under the `CNB_LAYERS_DIR` can be used as a layer in the final app image or build cache.
77

88
<!--more-->
99

1010
That is, each directory can be used for any of the following purposes:
1111

12-
* Launch - the directory will be included in the run image as a single layer
13-
* Cache - the directory will be included in the cache and restored on future builds
14-
* Build - the directory will be accessible by subsequent buildpacks
12+
| Layer Type | |
13+
|------------|-------------------------------------------------------------------------------------------------------------|
14+
| `Launch` | the directory will be included in the **final app image** as a single layer |
15+
| `Cache` | the directory will be included in the **build cache** and restored to the `CNB_LAYERS_DIR` on future builds |
16+
| `Build` | the directory will be accessible to **buildpacks that follow** in the build (via the environment) |
1517

16-
A buildpack defines how a layer will by used by creating a `<layer>.toml`
17-
with a name matching the directory it describes in the `CNB_LAYERS_DIR`.
18+
A buildpack can control how a layer will be used by creating a `<layer>.toml` with a name matching the directory it describes in the `CNB_LAYERS_DIR`.
1819

19-
For example, a buildpack might create a `$CNB_LAYERS_DIR/python` directory
20-
and a `$CNB_LAYERS_DIR/python.toml` with the following contents:
20+
### Example
21+
22+
A buildpack might create a `$CNB_LAYERS_DIR/python` directory and a `$CNB_LAYERS_DIR/python.toml` with the following contents:
2123

2224
```
2325
launch = true
2426
cache = true
2527
build = true
2628
```
2729

28-
In this example, the `python` directory will be included in the run image,
29-
cached for future builds, and will be accessible to subsequent buildpacks via the environment.
30+
In this example:
31+
* the final app image will contain a layer with `python`, as this is needed to run the app
32+
* the `$CNB_LAYERS_DIR/python` directory will be pre-created for future builds, avoiding the need to re-download this large dependency
33+
* buildpacks that follow in the build will be able to use `python`
3034

3135
### Example
3236

33-
This is a simple example of a buildpack that runs Python's `pip` package manager
34-
to resolve dependencies:
37+
This is a simple `./bin/build` script for a buildpack that runs Python's `pip` package manager to resolve dependencies:
3538

3639
```
3740
#!/bin/sh

content/docs/for-buildpack-authors/how-to/write-buildpacks/get-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
+++
22
title="Get started"
3-
weight=0
3+
weight=1
44
+++
55

66
To write a buildpack, we follow the [Buildpack Specification](https://github.com/buildpacks/spec/blob/main/buildpack.md),

content/docs/for-buildpack-authors/how-to/write-buildpacks/specify-launch-processes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
+++
22
title="Specify process types"
3-
weight=1
3+
weight=4
44
+++
55

66
One of the benefits of buildpacks is that they are multi-process - an image can have multiple entrypoints for each operational mode.

content/docs/for-buildpack-authors/how-to/write-buildpacks/use-build-plan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
+++
22
title="Use the build plan"
3-
weight=99
3+
weight=2
44
+++
55

66
The [Build Plan](https://github.com/buildpacks/spec/blob/main/buildpack.md#build-plan-toml) is a document that buildpacks can use to pass information between the `detect` and `build` phases, and between each other.

0 commit comments

Comments
 (0)