Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Build time and runtime images content to the Platform docs #770

Merged
57 changes: 57 additions & 0 deletions content/docs/for-platform-operators/concepts/base-images.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
+++
title="Base image types"
weight=99
+++

As you already know, `Cloud Native Buildpacks (CNBs)` transform your application source code into `OCI images` that can run on any cloud.

Check warning on line 6 in content/docs/for-platform-operators/concepts/base-images.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.WordList] Use 'app' instead of 'application'. Raw Output: {"message": "[Google.WordList] Use 'app' instead of 'application'.", "location": {"path": "content/docs/for-platform-operators/concepts/base-images.md", "range": {"start": {"line": 6, "column": 70}}}, "severity": "WARNING"}

<!--more-->

Each buildpack checks the source code and provides any relevant dependencies in the form of layers. Then, buildpack-provided layers are placed atop a runtime `base image` to form the final application image.

Check warning on line 10 in content/docs/for-platform-operators/concepts/base-images.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Passive] In general, use active voice instead of passive voice ('are placed'). Raw Output: {"message": "[Google.Passive] In general, use active voice instead of passive voice ('are placed').", "location": {"path": "content/docs/for-platform-operators/concepts/base-images.md", "range": {"start": {"line": 10, "column": 133}}}, "severity": "INFO"}

Check warning on line 10 in content/docs/for-platform-operators/concepts/base-images.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.WordList] Use 'app' instead of 'application'. Raw Output: {"message": "[Google.WordList] Use 'app' instead of 'application'.", "location": {"path": "content/docs/for-platform-operators/concepts/base-images.md", "range": {"start": {"line": 10, "column": 190}}}, "severity": "WARNING"}

## Base image types

A `base image` is an `OCI image` containing the base, or initial set of layers, for other images. It is helpful to distinguish between two distinct types of images, `Build` and `Runtime` images.

Check warning on line 14 in content/docs/for-platform-operators/concepts/base-images.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Contractions] Use 'it's' instead of 'It is'. Raw Output: {"message": "[Google.Contractions] Use 'it's' instead of 'It is'.", "location": {"path": "content/docs/for-platform-operators/concepts/base-images.md", "range": {"start": {"line": 14, "column": 99}}}, "severity": "INFO"}

### Build image

A `build image` is an `OCI image` that serves as the base image for the `build` environment in which the CNB `lifecycle` and buildpacks are executed.

Check warning on line 18 in content/docs/for-platform-operators/concepts/base-images.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Acronyms] Spell out 'CNB', if it's unfamiliar to the audience. Raw Output: {"message": "[Google.Acronyms] Spell out 'CNB', if it's unfamiliar to the audience.", "location": {"path": "content/docs/for-platform-operators/concepts/base-images.md", "range": {"start": {"line": 18, "column": 106}}}, "severity": "INFO"}

Check warning on line 18 in content/docs/for-platform-operators/concepts/base-images.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Passive] In general, use active voice instead of passive voice ('are executed'). Raw Output: {"message": "[Google.Passive] In general, use active voice instead of passive voice ('are executed').", "location": {"path": "content/docs/for-platform-operators/concepts/base-images.md", "range": {"start": {"line": 18, "column": 137}}}, "severity": "INFO"}

A typical `build image` might determine:

* The OS distro in the build environment

Check failure on line 22 in content/docs/for-platform-operators/concepts/base-images.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'distro'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'distro'?", "location": {"path": "content/docs/for-platform-operators/concepts/base-images.md", "range": {"start": {"line": 22, "column": 10}}}, "severity": "ERROR"}
* OS packages installed in the build environment
* Trusted CA certificates in the build environment
* The default user in the build environment

#### Anatomy of a build image

Typically, a `build` image may include:

* Shell
* C-compiler
* Minimal operating system distribution, such as Linux utilities that build systems might call out to
* Build time libraries

### Runtime image

A `runtime image` is an `OCI image` that serves as the base image for the final application image.

Check warning on line 38 in content/docs/for-platform-operators/concepts/base-images.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.WordList] Use 'app' instead of 'application'. Raw Output: {"message": "[Google.WordList] Use 'app' instead of 'application'.", "location": {"path": "content/docs/for-platform-operators/concepts/base-images.md", "range": {"start": {"line": 38, "column": 81}}}, "severity": "WARNING"}

A typical runtime image might determine:

* The OS distro or distroless OS in the launch environment

Check failure on line 42 in content/docs/for-platform-operators/concepts/base-images.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'distro'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'distro'?", "location": {"path": "content/docs/for-platform-operators/concepts/base-images.md", "range": {"start": {"line": 42, "column": 10}}}, "severity": "ERROR"}

Check failure on line 42 in content/docs/for-platform-operators/concepts/base-images.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'distroless'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'distroless'?", "location": {"path": "content/docs/for-platform-operators/concepts/base-images.md", "range": {"start": {"line": 42, "column": 20}}}, "severity": "ERROR"}
* OS packages installed in the launch environment
* Trusted CA certificates in the launch environment
* The default user in the run environment

#### Anatomy of a runtime base image

A `runtime` image may contain:

* No-shell, unless it's needed by the application

Check warning on line 51 in content/docs/for-platform-operators/concepts/base-images.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.WordList] Use 'app' instead of 'application'. Raw Output: {"message": "[Google.WordList] Use 'app' instead of 'application'.", "location": {"path": "content/docs/for-platform-operators/concepts/base-images.md", "range": {"start": {"line": 51, "column": 39}}}, "severity": "WARNING"}
* Runtime libraries, such as Libfreetype

Check failure on line 52 in content/docs/for-platform-operators/concepts/base-images.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'Libfreetype'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'Libfreetype'?", "location": {"path": "content/docs/for-platform-operators/concepts/base-images.md", "range": {"start": {"line": 52, "column": 30}}}, "severity": "ERROR"}
* Runtime platforms, such as python interpreter, which are generally added by buildpacks

For more details on `build` and `runtime` images, you can check out the [specification][spec]

[spec]: https://github.com/buildpacks/spec/blob/main/platform.md#build-image
7 changes: 4 additions & 3 deletions content/docs/for-platform-operators/concepts/builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ A builder consists of the following components:

* [Buildpacks][buildpack]
* A [lifecycle][lifecycle]
* A [build image](/docs/for-app-developers/concepts/base-images/build/)
* A reference to a [run image](/docs/for-app-developers/concepts/base-images/run/)
* A [build image][build-image]
* A reference to a [run image][run-image]

### Resources

To learn how to create your own builder, see our [Operator's Guide][operator-guide].

[builder-config]: /docs/reference/builder-config/
[buildpack]: /docs/for-platform-operators/concepts/buildpack/
[lifecycle]: /docs/for-platform-operators/concepts/lifecycle/
[operator-guide]: /docs/for-platform-operators/
[build-image]: /docs/for-platform-operators/concepts/base-images
[run-image]: /docs/for-platform-operators/concepts/base-images
Loading