Skip to content

Instantly share code, notes, and snippets.

@joaofnds
Created July 16, 2018 14:01
Show Gist options
  • Save joaofnds/67c563e62d7c8e2c6e8db6388ced1262 to your computer and use it in GitHub Desktop.
Save joaofnds/67c563e62d7c8e2c6e8db6388ced1262 to your computer and use it in GitHub Desktop.
multi-stage rails build based on ruby:alpine
FROM joaofnds/rails-alpine as builder
RUN mkdir /app
WORKDIR /app
COPY Gemfile Gemfile.lock /app/
RUN bundle install
FROM joaofnds/rails-alpine
RUN mkdir /app
WORKDIR /app
COPY --from=builder /usr/local/bundle/ /usr/local/bundle/
COPY --from=builder /app/ /app/
COPY . /app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment