Skip to content

Instantly share code, notes, and snippets.

@aristotelesbr
Created December 2, 2015 19:04
Show Gist options
  • Save aristotelesbr/5e692b9d27e4e1dc5ea3 to your computer and use it in GitHub Desktop.
Save aristotelesbr/5e692b9d27e4e1dc5ea3 to your computer and use it in GitHub Desktop.
FROM ubuntu:14.04
MAINTAINER Aristóteles Coutinho <[email protected]>
RUN apt-get update
# Defining the workplace
VOLUME ["/home/ruby/Workspace/Rails"]
# Install ruby dependencies
RUN apt-get install -y wget curl \
build-essential git git-core \
zlib1g-dev libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev
RUN apt-get update
# Install ruby-install
RUN cd /tmp &&\
wget -O ruby-install-0.5.0.tar.gz https://github.com/postmodern/ruby-install/archive/v0.5.0.tar.gz &&\
tar -xzvf ruby-install-0.5.0.tar.gz &&\
cd ruby-install-0.5.0/ &&\
make install
# Install MRI Ruby 2.2.2
RUN ruby-install ruby 2.2.2
# Add Ruby binaries to $PATH
ENV PATH /opt/rubies/ruby-2.2.2/bin:$PATH
# Add options to gemrc
RUN echo "gem: --no-document" > ~/.gemrc
# Install bundler
RUN gem install bundler
# Install Rails
RUN gem install --no-rdoc --no-ri rails
# Port
EXPOSE 8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment