-
Notifications
You must be signed in to change notification settings - Fork 165
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
270bfd9
commit 6c49ce5
Showing
45 changed files
with
142 additions
and
85 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
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 was deleted.
Oops, something went wrong.
62 changes: 62 additions & 0 deletions
62
content/docs/for-app-developers/concepts/buildpacks-basics/_index.md
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,62 @@ | ||
+++ | ||
title="Buildpacks basics" | ||
weight=1 | ||
expand=false | ||
+++ | ||
|
||
Learn how buildpacks convert your application source code into a secure, efficient, production-ready container image. | ||
|
||
<!--more--> | ||
|
||
## What are buildpacks? | ||
|
||
![buildpacks](/docs/concepts/what.svg) | ||
|
||
**[Buildpacks](/docs/for-platform-operators/concepts/buildpack) provide framework and runtime support for applications.** Buildpacks examine your apps to determine all the dependencies it needs and configure them appropriately to run on any cloud. | ||
|
||
|
||
## How do they work? | ||
|
||
![how](/docs/concepts/how.svg) | ||
|
||
**Each buildpack comprises of two phases -** | ||
|
||
### Detect phase | ||
|
||
The `detect` phase runs against your source code to determine if the buildpack is applicable or not. Once a buildpack is `detected` to be applicable, it proceeds to the `build` stage. If the project fails `detection` the `build` stage for a specific buildpack is skipped. | ||
|
||
For example: | ||
|
||
- A Python buildpack may look for a `requirements.txt` or a `setup.py` file pass | ||
- A Node buildpack may look for a `package-lock.json` file to pass | ||
|
||
### Build phase | ||
|
||
The `build` phase runs against your source code to - | ||
|
||
- Set up the build-time and run-time environment | ||
- Download dependencies and compile your source code (if needed) | ||
- Set appropriate entry point and startup scripts | ||
|
||
For example: | ||
|
||
- A Python buildpack may run `pip install -r requirements.txt` if it detected a `requirements.txt` file | ||
- A Node buildpack may run `npm install` if it detected a `package-lock.json` file | ||
|
||
## What is a builder? | ||
|
||
![builder](/docs/concepts/builder.svg) | ||
|
||
[`Builders`](/docs/for-platform-operators/concepts/builder) are an ordered combination of [`buildpacks`](/docs/for-platform-operators/concepts/buildpack) with a base `build image`, a lifecycle, and reference to a `run image`. | ||
They take in your `app` source code and build the output `app image`. The `build image` provides the base environment for the `builder` (for eg. an Ubuntu Bionic OS image with build tooling) and a `run image` provides the base environment for the `app image` during runtime. | ||
|
||
Under the hood a builder uses the [`lifecycle`](/docs/for-platform-operators/concepts/lifecycle) to run the `detect` phase for all the `buildpacks` it contains in order and then proceeds to run the `build` phase of all the `buildpacks` that passed detection. | ||
|
||
This allows us to have a **single** `builder` that can detect and build various kinds of applications automatically. | ||
|
||
For example, let's say `demo-builder` contains the `Python` and `Node` buildpack. Then - | ||
|
||
- If your project just has a `requirements.txt`, `demo-builder` will only run the Python `build` steps. | ||
- If your project just has a `package-lock.json`, `demo-builder` will only run the Node `build` steps. | ||
- If your project has both `package-lock.json` and `requirements.txt`, `demo-builder` will run **both** the Python and Node `build` steps. | ||
- If your project has no related files, `demo-builder` will fail to `detect` and exit. |
1 change: 1 addition & 0 deletions
1
content/docs/for-app-developers/concepts/buildpacks-basics/builder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
content/docs/for-app-developers/concepts/buildpacks-basics/how.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
content/docs/for-app-developers/concepts/buildpacks-basics/what.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions
3
content/docs/concepts/operations/_index.md → .../concepts/buildpacks-operations/_index.md
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
+++ | ||
title="Operations" | ||
title="Buildpacks operations" | ||
weight=2 | ||
include_summaries=true | ||
expand=true | ||
+++ |
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
File renamed without changes
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
File renamed without changes
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
+++ | ||
title="Build an application with buildpacks" | ||
weight=1 | ||
expand=true | ||
include_summaries=true | ||
+++ |
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
+++ | ||
title="Concepts" | ||
weight=2 | ||
expand=false | ||
title="Components" | ||
weight=1 | ||
include_summaries=true | ||
+++ | ||
summaries_max_depth=1 | ||
expand=true | ||
+++ |
File renamed without changes.
File renamed without changes.
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
File renamed without changes
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
File renamed without changes.
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
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.