简体   繁体   中英

Having Multiple buildpacks in cloudfoundry

I need to specify multiple buildpacks in my springboot application.

I have created a file multi-buildpack.yml in the root dir of my application where i have specified the 2 buildpacks.

multi-buildpack.yml File

buildpacks:
- https://github.com/cloudfoundry/python-buildpack
- https://github.com/cloudfoundry/java-buildpack

But i am getting the below error while pushing my app:

ERROR A multi-buildpack.yml file must be provided at your app root to use this buildpack.

Can anyone please help!

Thanks

Run the following command to ensure that you are using the cf CLI v6.38 or later:

$ cf version

To push your app with multiple buildpacks, specify each buildpack with a -b flag:

$ cf push YOUR-APP -b BUILDPACK-NAME-1 -b BUILDPACK-NAME-2 ... -b FINAL-BUILDPACK-NAME

The last buildpack you specify is the final buildpack, which can modify the launch environment and set the start command.

To see a list of available buildpacks, run cf buildpacks

More: https://docs.cloudfoundry.org/buildpacks/use-multiple-buildpacks.html

Unless you're on an older version of CloudFoundry, you shouldn't use the multi-buildpack buildpack anymore. True multi-buildpack support is available in the platform. Use that instead.

https://docs.cloudfoundry.org/buildpacks/use-multiple-buildpacks.html

This is currently a two step process due to some limitations with the current cf cli:

  1. cf push YOUR-APP --no-start -b binary_buildpack
  2. cf v3-push YOUR-APP -b BUILDPACK-NAME-1 -b BUILDPACK-NAME-2

That should go away at some point in the future and be just one command.

If you really want to use the multi-buildpack buildpack, double check the location of the multi-buildpack.yml file and the format of it. You can compare to one of the fixture tests here . Maybe even run one of the fixture tests to get a baseline test that works (or at least, should work).

Hope that helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM