$ git clone https://github.com/heroku/heroku-buildpack-ruby.git # or any other buildpack
$ cd heroku-buildpack-ruby
heroku-buildpack-ruby $ cat Dockerfile
FROM fabiokung/heroku-buildpack-base
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q ruby2.0
# more stuff specific to this buildpack...
heroku-buildpack-ruby $ docker build -t heroku-buildpack-ruby .
...
Successfully build xpto12345
heroku-buildpack-ruby $ docker inspect heroku-buildpack-ruby
...
"OnBuild": [
"ADD . /app",
"RUN /var/lib/buildpack/bin/compile /app /var/cache/buildpack",
"RUN ln -s /app/.profile.d/* /etc/profile.d/",
"ENV HOME /app"
]
Any ruby app (following heroku conventions) could use that buildpack:
$ cd my-heroku-ruby-app
$ docker build -t my-heroku-app-as-a-docker-container . <<END
FROM fabiokung/heroku-buildpack-ruby
END
Output from the heroku buildpack...