This tool provides a mechanism for building binaries for the Cloud Foundry buildpacks.
- NodeJS
- Ruby
- JRuby
- Python
- PHP
- Nginx
- Apache HTTPD Server
- Go
- Glide
- Godep
- Bundler
The scripts are meant to be run as root on a Cloud Foundry stack.
To run binary-builder
from within the cflinuxfs2 rootfs, use Docker:
docker run -w /binary-builder -v `pwd`:/binary-builder -it cloudfoundry/cflinuxfs2 bash
./bin/binary-builder --name=[binary_name] --version=[binary_version] --(md5|sha256)=[checksum_value]
This generates a gzipped tarball in the binary-builder directory with the filename format binary_name-binary_version-linux-x64
.
For example, if you were building ruby 2.2.3, you'd run the following commands:
$ docker run -w /binary-builder -v `pwd`:/binary-builder -it cloudfoundry/cflinuxfs2:ruby-2.2.4 ./bin/binary-builder --name=ruby --version=2.2.3 --md5=150a5efc5f5d8a8011f30aa2594a7654
$ ls
ruby-2.2.3-linux-x64.tgz
To build PHP, you also need to pass in a YAML file containing information about the various PHP extensions to be built. For example
docker run -w /binary-builder -v `pwd`:/binary-builder -it cloudfoundry/cflinuxfs2 bash
./bin/binary-builder --name=php --version=5.6.14 --md5=ae625e0cfcfdacea3e7a70a075e47155 --php-extensions-file=./php-extensions.yml
For an example of what this file looks like, see: PHP 5, PHP 7.0 & 7.1 & PHP 7.2.
Nginx uses GPG keys to verify the source tarball, so you'll need something like the following code to build the NGinx binary:
version=1.15.9
gpg_signature_url="http://nginx.org/download/nginx-${version}.tar.gz.asc"
gpg_signature=`curl -sL ${gpg_signature_url}`
docker run -w /binary-builder -v `pwd`:/binary-builder \
-it cloudfoundry/cflinuxfs2 ./bin/binary-builder \
--name=nginx-static --gpg-rsa-key-id=A1C052F8 \
--version=$version --gpg-signature="${gpg_signature}"
Find our guidelines here.
Open an issue on this project
The project backlog is on Pivotal Tracker
The integration test suite includes specs that test the functionality for building PHP with Oracle client libraries. These tests are tagged :run_oracle_php_tests
and require access to an S3 bucket containing the Oracle client libraries. This is configured using the environment variables AWS_ACCESS_KEY
and AWS_SECRET_ACCESS_KEY
If you do not need to test this functionality, exclude the tag :run_oracle_php_tests
when you run rspec
.