Skip to content

Instantly share code, notes, and snippets.

@shreeve
Created May 29, 2015 22:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shreeve/609d24faae63641074e2 to your computer and use it in GitHub Desktop.
Save shreeve/609d24faae63641074e2 to your computer and use it in GitHub Desktop.
Dockerfiles
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