Dockerfile 986 Bytes
FROM phusion/baseimage:0.9.8
MAINTAINER Jonathan Brilhante

ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8

# Install tools & libs to compile everything
RUN apt-get update && apt-get install -y build-essential libssl-dev libreadline-dev wget && apt-get clean

# Install imagemagick
RUN apt-get install -y imagemagick libmagick++-dev libmagic-dev && apt-get clean

RUN apt-get install -y python-software-properties

# Install ruby-build
RUN apt-get install -y git-core && apt-get clean
RUN git clone https://github.com/sstephenson/ruby-build.git && cd ruby-build && ./install.sh

# Install ruby 2.1.1
ENV CONFIGURE_OPTS --disable-install-rdoc
RUN ruby-build 2.1.1 /usr/local
RUN gem install bundler

# Enable insecure key to easily use ssh
RUN /usr/sbin/enable_insecure_key

#Mysql
RUN apt-get install -y mysql-client libmysqlclient-dev && apt-get clean
RUN gem install mysql2

ENV APP_HOME /myapp
RUN mkdir $APP_HOME
WORKDIR $APP_HOME

ADD * $APP_HOME/
RUN bundle install

ADD . $APP_HOME