Created
May 28, 2017 18:07
-
-
Save bbonislawski/d2c2f08e68e344d17e7beb7434b384ac to your computer and use it in GitHub Desktop.
Dockerfile for rails api with alpine image
This file contains 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.4.1-alpine | |
RUN set -x \ | |
&& apk upgrade --no-cache \ | |
&& apk add --no-cache --virtual build-dependencies \ | |
build-base libc-dev linux-headers tzdata \ | |
openssl-dev postgresql-dev \ | |
&& apk add --no-cache \ | |
libxml2-dev \ | |
libxslt-dev \ | |
&& gem install nokogiri \ | |
-- --use-system-libraries \ | |
--with-xml2-config=/usr/bin/xml2-config \ | |
--with-xslt-config=/usr/bin/xslt-config | |
RUN mkdir /app_name_api | |
WORKDIR /app_name_api | |
ADD Gemfile /app_name_api/Gemfile | |
ADD Gemfile.lock /app_name_api/Gemfile.lock | |
RUN bundle install | |
ADD . /app_name_api |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment