Deep-dive into buildpacks
By now, you may be wondering how buildpacks actually work and how to create/customize your own buildpacks. In order to create/customize buildpacks, we must first understand how they work with Cloud Foundry in the background.
How buildpacks actually work with Cloud Foundry
When a cf push
is performed, all application files are uploaded to a blobstore; subsequently, a staging task is created. This staging task is essentially a new container with the application files. The following buildpack process begins by running a series of scripts located in a bin
directory containing a number of script files, labeled as detect, compile, and release. These are called, in this order, during the staging process to retrieve the necessary dependencies, build artifacts, and/or configure the application:
Figure 5: The buildpack process
As shown in Figure 5, once application files are uploaded, the process goes on to check whether a buildpack was specified with cf push
. If not, the process...