-
-
Save luisangelorjr/5ec184eb31cb8c838d370ee994aca8e7 to your computer and use it in GitHub Desktop.
Dockerfile for installing ruby using rbenv
This file contains 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.4.8 | |
# am facing issue | |
# https://github.com/dotcloud/docker/issues/1123 | |
FROM ubuntu:12.04 | |
MAINTAINER Deepak Kannan "[email protected]" | |
RUN apt-get -y install python-software-properties | |
RUN apt-get -y update | |
# install essentials | |
RUN apt-get -y install build-essential | |
RUN apt-get install -y -q git | |
RUN add-apt-repository -y ppa:chris-lea/nginx-devel | |
RUN apt-get install -y -q nginx-full | |
# Install rbenv | |
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 "$RBENV_ROOT/bin:$RBENV_ROOT/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" | |
# does not work. PATH is set to | |
# $RBENV_ROOT/shims:$RBENV_ROOT/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | |
# install ruby2 | |
RUN rbenv install 2.0.0-p247 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment