Working with Cloud Native in Cloud Foundry

Page last updated:

This topic tells you about how buildpacks are structured and detected in Cloud Foundry.

Buildpack scripts

A buildpack repository might contain the following scripts in the bin directory:

  • bin/detect determines whether or not to apply the buildpack to an app.
  • bin/build is called if the buildpacks detect and builds the app including
    • downloading dependencies
    • actually building the app
    • defining the start command

You can use multiple buildpacks for your app.

For example:

You must use cf CLI v8 or later.

 cf push APP-NAME --lifecycle cnb -b docker://FIRST-BUILDPACK -b docker://SECOND-BUILDPACK

In this case all buildpacks must detect and build is called in the given order.

Create a pull request or raise an issue on the source for this page in GitHub