Skip to content

Instantly share code, notes, and snippets.

@thnery
Last active May 27, 2018 19:43
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save thnery/6f7427055b2f10db149f722da2a1c0a3 to your computer and use it in GitHub Desktop.
Dockerfile with Ruby Alpine
FROM ruby:2.4.2-alpine
ADD Gemfile /app/
ADD Gemfile.lock /app/
RUN apk add --no-cache bash gawk sed grep bc coreutils vim
RUN apk add --update ruby-dev build-base git \
libxml2-dev libxslt-dev pcre-dev libffi-dev \
postgresql-dev
RUN gem install bundler --no-ri --no-rdoc && \
cd /app && bundle install
RUN apk del ruby-dev build-base
ADD . /app
RUN chown -R nobody:nogroup /app
USER nobody
ENV RACK_ENV development
WORKDIR /app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment