Last active
December 20, 2015 18:59
-
-
Save tomohiro/6179799 to your computer and use it in GitHub Desktop.
Install Ruby with rbenv/ruby-build on Ubuntu 12.04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# DOCKER-VERSION 0.5.1 | |
FROM ubuntu:12.04 | |
MAINTAINER Tomohiro TAIRA "[email protected]" | |
# Install dependency packages | |
RUN apt-get update | |
RUN apt-get -y install build-essential | |
RUN apt-get -y install git curl | |
RUN apt-get -y install zlib1g-dev libreadline-dev libssl-dev libsqlite3-dev | |
RUN apt-get clean | |
# Deploy rbenv and ruby-build | |
RUN git clone https://github.com/sstephenson/rbenv.git /root/.rbenv | |
RUN git clone https://github.com/sstephenson/ruby-build.git /root/.rbenv/plugins/ruby-build | |
ENV RBENV_ROOT /root/.rbenv | |
ENV PATH /root/.rbenv/bin:/root/.rbenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
ADD ./rbenv.sh /etc/profile.d/rbenv.sh | |
# Install Ruby | |
RUN rbenv install 2.0.0-p247 | |
RUN rbenv global 2.0.0-p247 | |
RUn rbenv rehash | |
# Install Bundler | |
RUN gem install --no-ri --no-rdoc bundler | |
RUN rbenv rehash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rbenv | |
export RBENV_ROOT=/root/.rbenv | |
export PATH="$RBENV_ROOT/bin:$PATH" | |
eval "$(rbenv init -)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment