Skip to content

Instantly share code, notes, and snippets.

@gorsuch
Last active December 20, 2015 14:48
Show Gist options
  • Save gorsuch/6149031 to your computer and use it in GitHub Desktop.
Save gorsuch/6149031 to your computer and use it in GitHub Desktop.
saving my work ; starting to get rbenv up and running on a docker image
FROM base
RUN apt-get update
RUN apt-get -y install build-essential git libssl-dev curl
RUN git clone https://github.com/sstephenson/rbenv.git /usr/local/rbenv
RUN echo '# rbenv setup' > /etc/profile.d/rbenv.sh
RUN echo 'export RBENV_ROOT=/usr/local/rbenv' >> /etc/profile.d/rbenv.sh
RUN echo 'export PATH="$RBENV_ROOT/bin:$PATH"' >> /etc/profile.d/rbenv.sh
RUN echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh
RUN chmod +x /etc/profile.d/rbenv.sh
# install ruby-build
RUN mkdir /usr/local/rbenv/plugins
RUN git clone https://github.com/sstephenson/ruby-build.git /usr/local/rbenv/plugins/ruby-build
ENV RBENV_ROOT /usr/local/rbenv
ENV PATH /usr/local/rbenv/shims:/usr/local/rbenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RUN rbenv install 2.0.0-p247
ENV RBENV_VERSION 2.0.0-p247
RUN gem install bundler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment