How to check running application's buildpack In cloudfoundry?
I have many buildpacks deployed, is it possible to check used buildpacks on running application?
How to check running application's buildpack In cloudfoundry?
I have many buildpacks deployed, is it possible to check used buildpacks on running application?
You can do it multiple ways..
You can install buildpack-usage
cf cli plugin. You can find it here or here
The other option is to do
$> cf curl "/v2/apps"
Check out Cloud Foundry API
Give it a try. Let me know if you have any questions.
Two|Three Stepped Process worked for Cloud Foundry api version: 2.141.0:
cf app <app_name> --guid
- API Doccf curl /v2/apps/:APP-GUID/summary
- API Doc"buildpack"
in result, should be there - something like this If "buildpack"
not found then follow instructions post from @Smile - Adding here for easier read.
"detected_buildpack_guid"
in above result, e.g. cf curl /v2/buildpacks/:guid
- API Doc, then search for filename
in results, e.g., Note: Make sure to login into Cloud Foundry from terminal before executing these commands.
In addition to Abhijeet's answer, in case you get buildpack
attribute as null or empty, you can get the buildpack guid from detected_buildpack_guid
attribute and call buildback API like
cf curl /v2/buildpacks/:BUILDPACK-GUID
In recent released cloud foundry, it is showing buid packs beside your application.