Page last updated:
A stack is a prebuilt root filesystem (rootfs) that supports a specific operating system. For example, Linux-based systems need
/bin directories at their root. The stack works in tandem with a buildpack to support applications running in compartments. Under Diego architecture, cell VMs can support multiple stacks.
Note: Docker apps do not use stacks.
cflinuxfs2 stack is derived from Ubuntu Trusty 14.04. Refer to the Github stacks page for supported libraries.
You can also build your own custom stack. See the Adding a Custom Stack topic for instructions.
For security, stacks receive regular updates to address Common Vulnerabilities and Exposures (CVEs). Apps pick up on these stack changes through new releases of Cloud Foundry. However, if your app links statically to a library provided in the rootfs, you may have to manually restage it to pick up the changes.
It can be difficult to know what libraries an app statically links to, and it depends on the languages you are using. One example is an app that uses a Ruby or Python binary, and links out to part of the C standard library. If the C library requires an update, you may need to recompile the app and restage it as follows:
Use the cf stacks command to list the stacks available in a deployment.
$ cf stacks Getting stacks in org MY-ORG / space development as firstname.lastname@example.org... OK name description cflinuxfs2 Cloud Foundry Linux-based filesystem
To change your stack and restage your application, use the cf push command. For example, to restage your app on the default stack
cflinuxfs2you can run
cf push MY-APP:
$ cf push MY-APP Using stack cflinuxfs2... OK Creating app MY-APP in org MY-ORG / space development as email@example.com... OK ... requested state: started instances: 1/1 usage: 1G x 1 instances urls: MY-APP.cfapps.io last uploaded: Wed Apr 8 23:40:57 UTC 2015 state since cpu memory disk #0 running 2015-04-08 04:41:54 PM 0.0% 57.3M of 1G 128.8M of 1G
To specify a different stack, append
-s STACKNAMEto the command.
For API information, review the Stacks section of the Cloud Foundry API Documentation.Create a pull request or raise an issue on the source for this page in GitHub