-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3199 from dgageot/more-buildpacks-doc
[Doc] Buildpacks
- Loading branch information
Showing
5 changed files
with
46 additions
and
17 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
55 changes: 41 additions & 14 deletions
55
docs/content/en/docs/pipeline-stages/builders/buildpacks.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,39 +1,66 @@ | ||
--- | ||
title: "CNCF Buildpacks" | ||
title: "Cloud Native Buildpacks" | ||
linkTitle: "Buildpacks" | ||
weight: 50 | ||
featureId: build.buildpacks | ||
--- | ||
|
||
[Buildpacks]((https://buildpacks.io/)) enable building language-based containers from source code, without the need for a Dockerfile. | ||
[Cloud Native Buildpacks](https://buildpacks.io/) enable building language-based | ||
containers from source code, without the need for a Dockerfile. | ||
|
||
Skaffold supports building with buildpacks natively. | ||
|
||
Skaffold buildpacks support, builds the image inside local docker daemon. | ||
It mounts the source dependencies and local artifact cache if caching is enabled | ||
to a container in a docker daemon. These get unmounted once the build process is finished. | ||
Skaffold supports building with Buildpacks natively, without installing | ||
additional software. However, Buildpacks require a local Docker daemon | ||
to be used. | ||
|
||
Once all the necessary data is present, Skaffold wil build inside a container in a docker daemon | ||
with image specified in `builderImage` in the `buildpack` config. | ||
Once all the necessary data is present, Skaffold will build inside a container, | ||
with the local Docker daemon, with ther builder image specified in `builder`, | ||
in the `buildpack` config. | ||
|
||
On successful build completion, built images will be pushed to the remote registry. You can choose to skip this step. | ||
On successful build completion, built images will be pushed to the remote registry. | ||
You can choose to skip this step. | ||
|
||
|
||
**Configuration** | ||
### Configuration | ||
|
||
To use Buildpacks, add a `buildpack` field to each artifact you specify in the | ||
`artifacts` part of the `build` section. `context` should be a path to | ||
your source. | ||
your sources. | ||
|
||
The following options can optionally be configured: | ||
|
||
{{< schema root="BuildpackArtifact" >}} | ||
|
||
`builder` is *required* and tells Skaffold which | ||
[Builder](https://buildpacks.io/docs/app-developer-guide/build-an-app/) to use. | ||
|
||
**Example** | ||
|
||
The following `build` section, instructs Skaffold to build a | ||
Docker image `gcr.io/k8s-skaffold/skaffold-buildpacks` with buildpacks: | ||
Docker image with buildpacks: | ||
|
||
{{% readfile file="samples/builders/buildpacks.yaml" %}} | ||
|
||
### Dependencies | ||
|
||
`dependencies` tells the skaffold file watcher which files should be watched to | ||
trigger rebuilds and file syncs. Supported schema for `dependencies` includes: | ||
|
||
{{< schema root="BuildpackDependencies" >}} | ||
|
||
By default, every file in the artifact's `context` will be watched. | ||
|
||
#### Paths and Ignore | ||
|
||
`Paths` and `Ignore` are arrays used to list dependencies. | ||
Any paths in `Ignore` will be ignored by the skaffold file watcher, even if they are also specified in `Paths`. | ||
`Ignore` will only work in conjunction with `Paths`, and with none of the other custom artifact dependency types. | ||
|
||
```yaml | ||
buildpack: | ||
builder: "heroku/buildpacks" | ||
dependencies: | ||
paths: | ||
- pkg/** | ||
- src/*.go | ||
ignore: | ||
- vendor/** | ||
``` |
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