A ruby container with .ruby-version file support
Because in development we use rvm or rbenv, which both support the usage of a .ruby-version file to tell the application which ruby version to use. So now we want a container do the same thing without having to install a version manager.
How it Works
The installer is run in any container that takes
FROM itriage/rb. During the build process of your container we download pre-built binary that was compiled inside a docker container by our build server. If the version has been built it will immediatly download. If not, then we will build it on demand. Once the ruby version is downloaded it is extracted and its dependencies are automatically installed as part of your container's build process. We also add your app as part of the build process to
/mnt/app and set it as your working directory.
Simply inherit from our docker image, place a .ruby-version in your applications directory, and run
docker build ..
# Dockerfile FROM itriage/rb # Do some ruby things RUN gem install bundler RUN bundle install # How to run your app ENV PORT 9292 CMD rackup -p $PORT
# .ruby-version 2.1.2