Created
October 8, 2018 16:52
-
-
Save ngw/0078840bc8136e1cd9e823982b1c0d9e 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 ruby:2.5.1 | |
RUN apt-get update && apt-get install -qq -y build-essential libpq-dev postgresql-client \ | |
curl apt-utils apt-transport-https imagemagick --fix-missing --no-install-recommends | |
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - | |
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - | |
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list | |
RUN apt-get update && apt-get install -y nodejs yarn | |
RUN bundle config --global frozen 1 | |
# Cache gems | |
WORKDIR /tmp | |
ADD Gemfile . | |
ADD Gemfile.lock . | |
RUN gem install bundler | |
RUN bundle install --jobs 4 | |
WORKDIR /usr/src/directory | |
ADD . /usr/src/directory | |
RUN yarn install | |
RUN bundle exec rake assets:precompile | |
CMD bundle exec rake db:migrate && bundle exec rails s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment