New as of 0.24.0
builder:report [<app>] [<flag>] # Displays a builder report for one or more apps builder:set <app> <key> (<value>) # Set or clear a builder property for an app
Builders are a way of customizing how an app is built from a source, allowing users flexibility in how artifacts are created for later scheduling.
Dokku supports the following built-in builders:
builder-dockerfile: Builds apps using a
docker build. See the dockerfile builder documentation for more information on how this builder functions.
builder-herokuish: Builds apps with Heroku's v2a Buildpack specification via
gliderlabs/herokuish. See the herokuish builder documentation for more information on how this builder functions.
builder-pack: Builds apps with Cloud Native Buildpacks via the
pack-clitool. See the cloud native buildpacks builder documentation for more information on how this builder functions.
Builders run a detection script against a source code repository, and the first detected builder will be used to build the app artifact. The exception to this is when a
Dockerfile is detected and the app is also able to use either
pack-cli for building, in which case one of the latter will be chosen.
If desired, the builder can be specified via the
builder:set command by speifying a value for
selected. The selected builder will always be used.
dokku builder:set node-js-app selected dockerfile
The default value may be set by passing an empty value for the option:
dokku builder:set node-js-app selected
selected property can also be set globally. The global default is an empty string, and auto-detection will be performed when no value is set per-app or globally.
dokku builder:set --global selected herokuish
The default value may be set by passing an empty value for the option.
dokku builder:set --global selected
You can get a report about the app's builder status using the
=====> node-js-app builder information Builder computed selected: herokuish Builder global selected: herokuish Builder selected: herokuish =====> python-sample builder information Builder computed selected: dockerfile Builder global selected: herokuish Builder selected: dockerfile =====> ruby-sample builder information Builder computed selected: herokuish Builder global selected: herokuish Builder selected:
You can run the command for a specific app also.
dokku builder:report node-js-app
=====> node-js-app builder information Builder selected: herokuish
You can pass flags which will output only the value of the specific information you want. For example:
dokku builder:report node-js-app --builder-selected
To create a custom builder, the following triggers must be implemented:
builder-prefix) to use to build the app.
Custom plugins names must have the prefix
builder- or builder overriding via
builder:set may not function as expected.
Builders can use any tools available on the system to build the docker image, and may even be used to schedule building off-server. The only current requirement is that the image must exist on the server at the end of the
builder-build command, though this requirement may be relaxed in a future release.
For a simple example of how to implement this trigger, see
builder-pack, which utilizes a cli tool -
pack-cli - to generate an OCI image that is compatible with Docker and can be scheduled by the official scheduling plugins.