Skip to content

Commit 25a1178

Browse files
author
Natalie Arellano
committed
Clean up app-dev concepts
Signed-off-by: Natalie Arellano <[email protected]>
1 parent 0aa2350 commit 25a1178

File tree

44 files changed

+246
-235
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+246
-235
lines changed

content/docs/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ summary="Get started with Cloud Native Buildpacks."
1717

1818
## Going deeper
1919

20-
See how-to guides, concepts, and advanced tutorials tailored to specific personas:
20+
See how-to guides, concepts, and tutorials tailored to specific personas:
2121

2222
* [App Developers](/docs/for-app-developers/)
2323
* [Buildpack Authors](/docs/for-buildpack-authors/)
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
+++
22
title="Concepts"
33
weight=2
4-
expand=false
54
include_summaries=true
65
+++
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
+++
2+
title="What are base images?"
3+
weight=5
4+
include_summaries=true
5+
+++

content/docs/for-app-developers/concepts/base-images/build.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ title="Build image"
33
weight=1
44
+++
55

6-
## What is a build image?
7-
86
The **build image** provides the base image from which the build environment is constructed.
7+
8+
<!--more-->
9+
910
The build environment is the containerized environment in which the [lifecycle][lifecycle] (and thereby [buildpacks][buildpack]) are executed.

content/docs/for-app-developers/concepts/base-images/run.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ title="Run image"
33
weight=2
44
+++
55

6-
## What is a run image?
7-
86
The **run image** provides the base image for application images.
7+
8+
<!--more-->
9+
910
The lifecycle requires a reference to a run image and (where necessary) possible run image mirrors in order to construct the application image.
1011

1112
### Run image mirrors

content/docs/for-app-developers/concepts/base-images/stack.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
+++
22
title="Stack"
3-
weight=4
3+
weight=99
44
aliases=[
55
"/docs/using-pack/stacks/"
66
]
77
+++
88

9-
## What is a stack?
10-
119
A stack (deprecated) is the grouping together of the build and run base images, represented by a unique ID.
1210

11+
<!--more-->
12+
1313
As of Platform API 0.12 and Buildpack API 0.10, stacks are deprecated in favor of existing constructs in the container image ecosystem such as operating system name, operating system distribution, and architecture.
1414

1515
For more information, see
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
+++
2+
title="What happens during build?"
3+
weight=3
4+
+++
5+
6+
`Build` is the process of executing one or more [buildpacks][buildpack] against an application's source code to produce a runnable OCI image.
7+
8+
<!--more-->
9+
10+
## Building explained
11+
12+
![build diagram](/docs/for-app-developers/concepts/build.svg)
13+
14+
Each [buildpack] inspects the source code and provides relevant dependencies.
15+
An image is then generated from the app's source code and these dependencies.
16+
17+
During the build process, the [build-time base image] becomes the environment in which buildpacks are executed,
18+
and the [runtime base image] becomes the base for the final app image.
19+
20+
[Buildpacks][buildpack] can be bundled together with a specific [build-time base image], resulting in a [builder] image.
21+
Builders provide a convenient way to distribute buildpacks.
22+
23+
[build-time base image]: /docs/for-app-developers/concepts/base-images/build/
24+
[builder]: /docs/for-platform-operators/concepts/builder
25+
[buildpack]: /docs/for-app-developers/concepts/buildpack/
26+
[lifecycle]: /docs/for-platform-operators/concepts/lifecycle/
27+
[runtime base image]: /docs/for-app-developers/concepts/base-images/run/
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
+++
2+
title="What is a builder?"
3+
weight=2
4+
+++
5+
6+
A `builder` is an OCI image containing
7+
an ordered combination of [buildpacks][buildpack] and
8+
a [build-time base image], a [lifecycle] binary, and a reference to a [runtime base image].
9+
10+
<!--more-->
11+
12+
The [build-time base image] provides the base environment for the `builder`
13+
(e.g., an Ubuntu Jammy OS image with build tooling) and
14+
a [runtime base image] provides the base environment for the `app image` during runtime.
15+
16+
![builder](/docs/for-app-developers/concepts/builder.svg)
17+
18+
Under the hood a builder uses the [lifecycle] to run the `detect` phase for all the `buildpacks` it contains, in order,
19+
and then proceeds to run the `build` phase for all the `buildpacks` that passed detection.
20+
21+
This allows us to have a **single** `builder` that can detect and build various kinds of applications automatically.
22+
23+
For example, let's say `demo-builder` contains the `Python` and `Node` buildpack. Then -
24+
25+
- If your project just has a `requirements.txt`, `demo-builder` will only run the Python `build` steps.
26+
- If your project just has a `package-lock.json`, `demo-builder` will only run the Node `build` steps.
27+
- If your project has both `package-lock.json` and `requirements.txt`, `demo-builder` will run **both** the Python and Node `build` steps.
28+
- If your project has no related files, `demo-builder` will fail to `detect` and exit.
29+
30+
[build-time base image]: /docs/for-app-developers/concepts/base-images/build/
31+
[buildpack]: /docs/for-app-developers/concepts/buildpack/
32+
[lifecycle]: /docs/for-platform-operators/concepts/lifecycle/
33+
[runtime base image]: /docs/for-app-developers/concepts/base-images/run/

0 commit comments

Comments
 (0)