Skip to content

Instantly share code, notes, and snippets.

@y13i
Created May 15, 2018 03:43
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 y13i/c695ce19d502d3815469848ada07a8cb to your computer and use it in GitHub Desktop.
Save y13i/c695ce19d502d3815469848ada07a8cb to your computer and use it in GitHub Desktop.
Ruby on Rails on Docker & Alpine Linux
FROM ruby:2.5-alpine
RUN mkdir /app
WORKDIR /app
RUN \
set -x \
&& apk upgrade --no-cache \
&& apk add --no-cache --virtual \
build-dependencies \
&& apk add --no-cache \
build-base \
tzdata \
postgresql-dev \
libxml2-dev \
libxslt-dev
COPY Gemfile .
COPY Gemfile.lock .
RUN \
set -x \
&& gem install rake \
&& bundle config build.nokogiri --use-system-libraries \
&& bundle install \
&& apk del build-dependencies
COPY . .
RUN rm -rf log tmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment