Cloud Native Buildpacks alpha
Cloud Native Buildpacks enable building a container image from source code without the need for a Dockerfile.
Skaffold supports building with Cloud Native Buildpacks, requiring only
a local Docker daemon. Skaffold performs the build inside a container
builder specified in the
On successful build completion, the built image will be pushed to the remote registry. You can choose to skip this step.
To use Buildpacks, add a
buildpack field to each artifact you specify in the
artifacts part of the
context should be a path to
The following options can optionally be configured:
||Required builder image used.|
||overrides the stack’s default run image.|
||environment variables, in the
||a list of strings, where each string is a specific buildpack to use with the builder. If you specify buildpacks the builder image automatic detection will be ignored. These buildpacks will be used to build the Image from your source code. Order matters.||
||file dependencies that skaffold should watch for both rebuilding and file syncing for this artifact.|
builder is required and tells Skaffold which
Builder to use.
User defined environment variables
env makes it possible to configure specific environment variables for buildpacks.
Many buildpacks use environment variables to adjust their detection and the build phases,
such as selecting specific versions of language runtimes.
Note that user’s current environment is not passed through to buildpacks.
build section, instructs Skaffold to build a
Docker image with buildpacks:
apiVersion: skaffold/v1 kind: Config build: artifacts: - image: gcr.io/k8s-skaffold/skaffold-buildpacks buildpack: builder: "heroku/buildpacks"
dependencies tells the skaffold file watcher which files should be watched to
trigger rebuilds and file syncs. Supported schema for
||should be set to the file dependencies for this artifact, so that the skaffold file watcher knows when to rebuild and perform file synchronization.||
||specifies the paths that should be ignored by skaffold’s file watcher. If a file exists in both
By default, every file in the artifact’s
context will be watched.
Paths and Ignore
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
Ignore will only work in conjunction with
Paths, and with none of the other custom artifact dependency types.
buildpack: builder: "heroku/buildpacks" dependencies: paths: - pkg/** - src/*.go ignore: - vendor/**
The container images produced by Cloud Native Buildpacks cannot
be configured by
skaffold debug for debugging.
These images use a
launcher binary as an entrypoint to run commands
that are specified in a set of configuration files, which cannot
be altered by