Created
December 2, 2019 15:37
-
-
Save esmerino/5efca773d1d7ed5d8d07fb7efa1f9aea to your computer and use it in GitHub Desktop.
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.6.4-alpine | |
RUN apk add --no-cache --update build-base \ | |
linux-headers \ | |
libxml2-dev \ | |
libxslt-dev \ | |
postgresql-dev \ | |
tzdata \ | |
nodejs \ | |
yarn \ | |
ghostscript \ | |
py-simplejson \ | |
git \ | |
icu \ | |
icu-dev \ | |
&& rm -rf /var/cache/apk/* | |
RUN mkdir -p /app | |
WORKDIR /app | |
COPY Gemfile Gemfile.lock ./ | |
COPY vendor ./vendor | |
RUN gem install bundler | |
RUN bundle config build.nokogiri --use-system-libraries | |
RUN bundle config build.charlock_holmes --use-system-libraries | |
RUN bundle install --jobs `expr $(cat /proc/cpuinfo | grep -c "cpu cores") - 1` --retry 5 | |
COPY . ./ | |
ENV PORT 3000 | |
EXPOSE 3000 | |
ENTRYPOINT ["bundle", "exec"] | |
CMD ["foreman", "start"] | |
ARG GIT_USER_EMAIL | |
ARG GIT_USER_NAME | |
RUN git config --global user.email "${GIT_USER_EMAIL}" | |
RUN git config --global user.name "${GIT_USER_NAME}" | |
RUN git config --global push.default matching |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment