Created
March 8, 2018 15:48
-
-
Save danielalvarenga/fd908026059b82d78b70e0ac50c8c76c to your computer and use it in GitHub Desktop.
Dockerfile for rails application with alpine linux
This file contains hidden or 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-alpine3.7 | |
RUN apk add --update --no-cache \ | |
build-base \ | |
nodejs \ | |
tzdata \ | |
libxml2-dev \ | |
libxslt-dev \ | |
bash \ | |
postgresql-dev \ | |
mysql-dev | |
ARG rails_env=development | |
ENV APP_ROOT /app | |
RUN mkdir $APP_ROOT | |
WORKDIR $APP_ROOT | |
RUN bundle config --global frozen 1 | |
COPY Gemfile $APP_ROOT/Gemfile | |
COPY Gemfile.lock $APP_ROOT/Gemfile.lock | |
RUN RAILS_ENV=$rails_env_variable bundle install --path /bundle | |
COPY . $APP_ROOT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment