New as of 0.22.0
buildpacks:set-property [--global|<app>] <key> <value> # Set or clear a buildpacks property for an app
Cloud Native Buildpacks are an evolution over the Buildpacks technology provided by the Herokuish builder. See the herokuish buildpacks documentation for more information on how to clear buildpack build cache for an application.
Warning: This functionality uses the
packcli from the Cloud Native Buildpacks project to build apps. As the integration is experimental in Dokku, it is likely to change over time.
pack cli tool is not included by default with Dokku or as a dependency. It must also be installed as shown on this page.
Builds will proceed with the
pack cli for the app from then on.
As this functionality is highly experimental, there are a number of caveats. Please note that not all issuesare listed below.
repo:purge-cachecurrently has no effect.
packis not currently included with Dokku, nor is it added as a package dependency.
This builder will be auto-detected in either the following cases:
DOKKU_CNB_EXPERIMENTALapp environment variable is set to
dokku config:set --no-restart node-js-app DOKKU_CNB_EXPERIMENTAL=1
project.tomlfile exists in the root of the app repository.
pack-cliand used to describe how the app is built.
The builder can also be specified via the
dokku builder:set node-js-app selected pack
Dokku will only select the
dockerfilebuilder if both the
packbuilders are not detected and a Dockerfile exists. See the dockerfile builder documentation for more information on how that builder functions.
When deploying a monorepo, it may be desirable to specify the specific path of the
project.toml file to use for a given app. This can be done via the
builder-pack:set command. If a value other than
project.toml is specified and that file does not exist in the app's build directory, Dokku will continue the build process as if the repository has no
dokku builder-pack:set node-js-app projecttoml-path project2.toml
The default value may be set by passing an empty value for the option:
dokku builder-pack:set node-js-app projecttoml-path
projecttoml-path property can also be set globally. The global default is
project.toml, and the global value is used when no app-specific value is set.
dokku builder-pack:set --global projecttoml-path project2.toml
The default value may be set by passing an empty value for the option.
dokku builder-pack:set --global projecttoml-path
New as of 0.25.0
You can get a report about the app's storage status using the
=====> node-js-app builder-pack information Builder-pack computed projecttoml path: project2.toml Builder-pack global projecttoml path: project.toml Builder-pack projecttoml path: project2.toml =====> python-sample builder-pack information Builder-pack computed projecttoml path: project.toml Builder-pack global projecttoml path: project.toml Builder-pack projecttoml path: =====> ruby-sample builder-pack information Builder-pack computed projecttoml path: project.toml Builder-pack global projecttoml path: project.json Builder-pack projecttoml path:
You can run the command for a specific app also.
dokku builder-pack:report node-js-app
=====> node-js-app builder-pack information Builder-pack computed projecttoml path: project2.toml Builder-pack global projecttoml path: project.toml Builder-pack projecttoml path: project2.toml
You can pass flags which will output only the value of the specific information you want. For example:
dokku builder-pack:report node-js-app --builder-pack-projecttoml-path
New as of 0.23.0
The default stack builder in use by CNB buildpacks in Dokku is based on
heroku/buildpacks. Users may desire to switch the stack builder to a custom version, either to update the operating system or to customize packages included with the stack builder. This can be performed via the
dokku buildpacks:set-property node-js-app stack paketobuildpacks/build:base-cnb
The specified stack builder can also be unset by omitting the name of the stack builder when calling
dokku buildpacks:set-property node-js-app stack
A change in the stack builder value will execute the
Finally, stack builders can be set or unset globally as a fallback. This will take precedence over a globally set
DOKKU_CNB_BUILDER environment variable (
heroku/buildpacks by default).
# set globally dokku buildpacks:set-property --global stack paketobuildpacks/build:base-cnb # unset globally dokku buildpacks:set-property --global stack