Prepare image which is installed muliple versions of ruby and bundler for each versions.
You can use this image for your project soon. It's uploaded docker.io, ryoh/rbenv
docker pull ryoh/rbenv
or in Dockerfile
Run it !
docker run -i -t tcnksm/rbenv bash -l -c 'rbenv global 2.1.0; bundle ...'
Build rbenv image
Install multiple versions of ruby by rbenv. you can define ruby verion which you want to use in
Use Vagrant for VM running docker. Vagrant 1.4 has a Docker provisioner.
Download it here.
And login to VM.
Now you can use docker in VM.
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
- Using Docker and Vagrant on Mac OS X with a Ruby on Rails application