Skip to content

Docker setup for building binaries for Heroku's Ruby Buildpack

License

Notifications You must be signed in to change notification settings

heroku/docker-heroku-ruby-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6cb404c · Mar 18, 2025
Mar 18, 2025
Mar 7, 2025
Mar 7, 2025
Mar 7, 2025
Apr 28, 2015
Jul 2, 2024
Mar 7, 2025
Mar 7, 2025
Mar 5, 2014
Jul 3, 2024
Sep 18, 2024
Sep 18, 2024
Sep 18, 2024

Repository files navigation

Ruby + JRuby Builder for Heroku

This repo contains scripts to build binaries locally and on GitHub Actions.

Building with GitHub actions

Navigate to GithHub actions. Select the workflow:

Then click the drop down "Run workflow" and enter the desired Ruby version.

Employees of Heroku see: The Ruby language guides (not public) for additional details on building and deploying Ruby versions.

Install

Run it locally

List available rust scripts:

$ cargo run --bin
# ...
Available binaries:
    jruby_build
    jruby_changelog
    jruby_check
    ruby_build
    ruby_changelog
    ruby_check

Binaries are prefixed with either ruby or jruby.

To see the arguments required to a binary, call it without args or with -- --help:

$ cargo run --bin ruby_build
$ cargo run --bin ruby_build -- --help
  # ...
Usage: ruby_build --arch <ARCH> --version <VERSION> --base-image <BASE_IMAGE>

Options:
      --arch <ARCH>
      --version <VERSION>
      --base-image <BASE_IMAGE>
  -h, --help                     Print help

To pass arguments into a binary you have to use a double dash (--) separator (to let cargo know you're not trying to give it an argument).

For example:

$ cargo run --bin ruby_check -- --version 3.1.6 --arch arm64 --base-image heroku-24
# ...
- Done (finished in 4.9s)

## Ruby 3.1.6 linux/arm64 for heroku-24

- Rubygems version: 3.3.27
- Ruby version: ruby 3.1.6p260 (2024-05-29 revision a777087be6) [aarch64-linux]

Two directories are manipulated when running scripts cache and ouput. Downloaded files will live in cache and built/packaged files live in the output directory.

Development

For more details see .github/workflows/ci.yml.

Run unit tests:

$ cargo test

About

Docker setup for building binaries for Heroku's Ruby Buildpack

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published