Pushing an Application with Multiple Buildpacks

Page last updated:

This topic describes how developers can push an application with multiple buildpacks.

For more information about pushing applications to Cloud Foundry, see the Deploy an Application topic.

Specifying Buildpacks with the cf CLI

To push an application with multiple buildpacks using the Cloud Foundry Command Line Interface (cf CLI), perform the following procedure:

  1. Ensure you are using the cf CLI v6.32.0+:
    $ cf version
    cf version 6.32.0+0191c33d9.2017-09-26
    
    For more information about upgrading the cf CLI, see Installing the cf CLI.
  2. Push the application with the binary buildpack with the --no-start flag:
    $ cf push YOUR-APP --no-start -b binary_buildpack
    This command pushes the application but does not start it.
  3. Upgrade the application to multiple buildpacks, and specify the buildpacks:
    $ cf v3-push YOUR-APP -b BUILDPACK-NAME-1 -b BUILDPACK-NAME-2
    
    This command changes the buildpack and starts the application. To see a list of available buildpacks, run cf buildpacks.

Note: The two-push workflow is currently required because only v3-push supports multiple buildpacks.

For more information about V3 commands, see the Using Experimental cf CLI Commands topic. The v3-push command has the following restrictions:

  • v3-push currently only supports a subset of features of push. In particular, it does not support the following:
    • application manifests
    • flags to set the stack or modify the default mapped route
    • exclusions from a .cfignore file
  • If you use an application manifest, you cannot include the buildpack key or future pushes will not function properly.
  • You can use the following commands to update the configuration of an application started with v3-push:
    • map-route
    • bind-service
    • v3-set-env
    • v3-scale
    • v3-set-health-check

For more information about V3 commands, see the Using Experimental cf CLI Commands topic.

For more information about using the cf CLI, see the Cloud Foundry Command Line Interface topic.

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