Created
May 29, 2015 22:50
-
-
Save shreeve/609d24faae63641074e2 to your computer and use it in GitHub Desktop.
Dockerfiles
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-debootstrap:14.04 | |
# Nodejs needed for ruby asset pipeline | |
RUN apt-get update -y \ | |
&& apt-get install -y \ | |
curl \ | |
libpq-dev \ | |
&& curl -sSL https://deb.nodesource.com/setup_0.12 | bash - \ | |
&& apt-get install -y nodejs \ | |
&& apt-get autoremove -y \ | |
&& apt-get autoclean -y \ | |
&& apt-get clean -y \ | |
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | |
# Latest stable ruby | |
RUN curl -sSL https://rvm.io/mpapis.asc | gpg --import - && \ | |
curl -sSL get.rvm.io | bash -s stable --ruby=2.1.2 | |
ENV PATH $PATH:/usr/local/rvm/rubies/default/bin | |
RUN gem update --no-rdoc --no-ri \ | |
&& gem install --no-rdoc --no-ri bundler foreman | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
COPY Gemfile.lock /usr/src/app/ | |
COPY Gemfile /usr/src/app/ | |
RUN bundle install | |
COPY . /usr/src/app | |
EXPOSE 3000 7777 | |
CMD ["foreman", "start"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment