Dockerfile to prepare image which is installed muliple versions of ruby and bundler for each versions.
You can use this image for your project soon. It is installed ruby 1.8.7-p371, 1.9.3-p392, 2.0.0-p353:
docker run -i -t tcnksm/rbenv bash -l -c 'rbenv global 2.0.0-p353; bundle ...'
Build your own rbenv image
You can build your own rbenb-image with favor versions of ruby. You can define ruby verion which you want to use in
$ docker build -t <TAG> .
Dockerfile execute belows;
- Pull base image (this time ubuntu)
- Install packages which are needed to build ruby
- Clone rbenv
- Clone ruby-build
- Install multiple versions of ruby which are defined at
- Install Bundler for each version
Now DockerHub has its official language stack, so you should see ruby Repository.
- Fork (https://github.com/tcnksm/dockerfile-rbenv/fork)
- Create a feature branch
- Commit your changes
- Rebase your local changes against the master branch
- Push it to your remote repository
- Create new Pull Request