Skip to content

Instantly share code, notes, and snippets.

@scan
Created May 4, 2017 08:58
Show Gist options
  • Save scan/d05837bcf8aff62f6c029e927dce19ca to your computer and use it in GitHub Desktop.
Save scan/d05837bcf8aff62f6c029e927dce19ca to your computer and use it in GitHub Desktop.
Dockerfile for alpine based rails app
FROM ruby:2.4.1-alpine
RUN apk --update --upgrade add build-base nodejs libxml2-dev libxslt-dev tzdata
RUN mkdir /app
WORKDIR /app
ADD Gemfile /app/Gemfile
ADD Gemfile.lock /app/Gemfile.lock
RUN bundle config --global build.nokogiri "--use-system-libraries" && bundle install --jobs 4
ADD . /app
CMD ["bundle", "exec", "rails", "server", "-b", "0.0.0.0"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment