Skip to content

Instantly share code, notes, and snippets.

@tcnksm tcnksm/gist:9388736
Created Mar 6, 2014

What would you like to do?
FROM centos
# Install basic packages
RUN rpm -Uvh
RUN yum -y update
RUN yum install -y make gcc gcc-c++ wget curl git
RUN yum install -y openssl-devel zlib-devel readline-devel libffi-devel httpd-devel libyaml-devel
RUN yum install -y bzip2 autoconf automake libtool bison iconv-devel ruby-devel
RUN yum --enablerepo=epel -y install libyaml-devel
# Install rbenv and ruby-build
RUN git clone /root/.rbenv
RUN git clone /root/.rbenv/plugins/ruby-build
RUN ./root/.rbenv/plugins/ruby-build/
ENV PATH /root/.rbenv/bin:$PATH
RUN echo 'eval "$(rbenv init -)"' >> /etc/profile.d/ # or /etc/profile
RUN echo 'eval "$(rbenv init -)"' >> .bashrc
# Install multiple versions of ruby
ENV CONFIGURE_OPTS --disable-install-doc
RUN rbenv install 2.0.0-p353
RUN rbenv install 1.9.3-p484
# Install Bundler for each version of ruby
RUN echo 'gem: --no-rdoc --no-ri' >> /.gemrc
RUN bash -l -c 'rbenv global 2.0.0-p353; gem update; gem install bundler'
RUN bash -l -c 'rbenv global 1.9.3-p484; gem update; gem install bundler'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.