Created
November 17, 2013 00:49
-
-
Save nicolasbernard/7507515 to your computer and use it in GitHub Desktop.
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
FROM ubuntu:12.04 | |
MAINTAINER Nicolas BERNARD <[email protected]> | |
# Ruby | |
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6 | |
RUN echo deb http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu precise main > /etc/apt/sources.list.d/brightbox.list | |
# NodeJS (Assets pipeline) | |
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C7917B12 | |
RUN echo deb http://ppa.launchpad.net/chris-lea/node.js/ubuntu precise main > /etc/apt/sources.list.d/nodejs.list | |
# Dependencies | |
RUN echo deb http://archive.ubuntu.com/ubuntu precise universe >> /etc/apt/sources.list | |
RUN apt-get update | |
RUN apt-get install -y ruby2.0 ruby2.0-dev nodejs build-essential git libssl-dev libxslt-dev libxml2-dev libsqlite3-dev | |
# We need --pre for bundler 1.5 which brings parallels jobs | |
RUN gem2.0 install bundler --pre --no-rdoc --no-ri | |
RUN mkdir -p /var/webapp | |
ADD . /var/webapp | |
RUN cd /var/webapp && bundle install --deployment --jobs 4 | |
WORKDIR /var/webapp | |
EXPOSE 3000 | |
ENTRYPOINT ["bin/bundle", "exec"] | |
CMD ["rails", "server"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment