Created
July 31, 2016 16:36
-
-
Save tarla/328157bc5d0739efbce2be5933990307 to your computer and use it in GitHub Desktop.
default ruby/rails Dockerfile with alpine
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.3-alpine | |
MAINTAINER Joao Tarla <joao@tarla.com.br> | |
ENV BUILD_PACKAGES="curl-dev ruby-dev build-base bash" \ | |
DEV_PACKAGES="zlib-dev libxml2-dev libxslt-dev tzdata yaml-dev postgresql-dev" \ | |
RUBY_PACKAGES="ruby-json yaml nodejs" | |
RUN apk --update add --no-cache --update\ | |
$BUILD_PACKAGES \ | |
$DEV_PACKAGES \ | |
$RUBY_PACKAGES && \ | |
rm -rf /var/cache/apk/* && \ | |
mkdir -p /usr/src/app | |
ONBUILD WORKDIR /usr/src/app | |
ONBUILD COPY . /usr/src/app | |
ONBUILD EXPOSE 9000 | |
ONBUILD RUN bundle config build.nokogiri --use-system-libraries && \ | |
bundle install && \ | |
bundle clean | |
WORKDIR /usr/src/app/ | |
CMD ["rails", "server", "-b", "0.0.0.0", "-p", "9000"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment