This change adds a new builder - builder-cnb - via the 'DOKKU_CNB_EXPERIMENTAL' environment variable. While support for customizing pack builds is not currently implemented and there may be other missing functionality, this initial implementation allows folks to start playing with CNB. Future releases of Dokku will provide tighter CNB integration and eventually switch to CNB for default building, as well as allow users to better select builders needed for their applications. All new code for CNB support should be considered experimental and subject to change as the support evolves over time.
2.0 KiB
Cloud Native Buildpacks (Experimental)
New as of 0.22.0
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.
Usage
To use this builder instead of either Dockerfile or herokuish, you must set the DOKKU_CNB_EXPERIMENTAL environment variable for your app to 1.
dokku config:set --no-restart node-js-app DOKKU_CNB_EXPERIMENTAL=1
The 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.
Caveats
As this functionality is highly experimental, there are a number of caveats. Please note that not all issuesare listed below.
- The
heroku/buildpacks:latestCNB builder is currently enforced. Specifying specific builders is not currently possible.- A future release will allow modifying the chosen builder.
- Specifying specific buildpacks is not currently possible.
- A future release will add support for the
buildpacksplugin.
- A future release will add support for the
- There is currently no way to specify extra arguments for
packcli invocations.- A future release will add support for injecting extra arguments during the build process.
- The default process type is
web. - Build cache is stored in Docker volumes instead of on disk. As such,
repo:purge-cachecurrently has no effect.- A future version will add integration with the
repoplugin.
- A future version will add integration with the
packis not currently included with Dokku, nor is it added as a package dependency.- A future version will include it as a package dependency.