Created
December 28, 2014 20:03
-
-
Save alvincrespo/99586f1d213e6a25496b to your computer and use it in GitHub Desktop.
Ruby on Rails w/ Docker + Rbenv
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
FROM ubuntu:14.04 | |
MAINTAINER Alvin Crespo <[email protected]> | |
RUN apt-get update | |
RUN apt-get install -y git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common python-software-properties | |
RUN apt-get clean | |
# Install Rbenv | |
RUN git clone git://github.com/sstephenson/rbenv.git /root/.rbenv | |
RUN echo 'export PATH="/root/.rbenv/bin:$PATH"' >> /root/.bashrc | |
RUN exec $SHELL | |
# Install Ruby-Build | |
RUN git clone git://github.com/sstephenson/ruby-build.git /root/.rbenv/plugins/ruby-build | |
RUN /root/.rbenv/plugins/ruby-build/install.sh | |
RUN exec $SHELL | |
RUN echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh # or /etc/profile | |
RUN echo 'eval "$(rbenv init -)"' >> .bashrc | |
# Expose Rbenv | |
ENV PATH /root/.rbenv/shims:/root/.rbenv/bin:$PATH | |
# Setup Rbenv | |
RUN rbenv install 2.1.5 | |
RUN rbenv global 2.1.5 | |
RUN rbenv rehash | |
# Configure Gems | |
RUN echo "gem: --no-ri --no-rdoc" > /root/.gemrc | |
# Install NodeJS | |
RUN add-apt-repository ppa:chris-lea/node.js | |
RUN apt-get update | |
RUN apt-get install -y nodejs | |
RUN apt-get clean | |
# Install Rails | |
RUN gem install rails |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment