Builds binaries against the rootfs of your choice.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin Use nginx-static for nginx recipe Sep 7, 2018
lib Remove md5 check on geoIP database downloads [#157287202] May 3, 2018
recipe
spec Update yaml_flag_spec for httpd Sep 20, 2018
.gitignore Add OraclePHP recipe tweaks and integration specs Aug 25, 2016
.rspec add rspec instafail Jun 2, 2015
.rubocop.yml add rubocop Feb 10, 2016
CONTRIBUTING.md update with friendlier instructions Jun 29, 2015
Gemfile Pin gems that don't work on cflinuxfs3 Sep 12, 2018
Gemfile.lock Pin gems that don't work on cflinuxfs3 Sep 12, 2018
LICENSE jruby archiving Sep 24, 2015
NOTICE Create copyright NOTICE Dec 21, 2016
PHP-Geoip.md Fix downloading of free GeoIP legacy databases [#156632708] Apr 12, 2018
PHP-Oracle.md Update README with new PHP instructions Jan 25, 2017
README.md Fix README wording Jan 25, 2017
go-version.yml Update go from 1.9.2 to 1.9.3 [#154539512] Jan 22, 2018

README.md

Introduction

This tool provides a mechanism for building binaries for the Cloud Foundry buildpacks.

Currently supported binaries

  • NodeJS
  • Ruby
  • JRuby
  • Python
  • PHP
  • Nginx
  • Apache HTTPD Server
  • Go
  • Glide
  • Godep
  • Bundler

Usage

The scripts are meant to be run on a Cloud Foundry stack.

Running within Docker

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

Building PHP

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: https://github.com/cloudfoundry/public-buildpacks-ci-robots/blob/master/binary-builds/php-extensions.yml

Contributing

Find our guidelines here.

Reporting Issues

Open an issue on this project

Active Development

The project backlog is on Pivotal Tracker

Running the tests

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.