Skip to content

Instantly share code, notes, and snippets.

@esmerino
Created December 2, 2019 15:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esmerino/5efca773d1d7ed5d8d07fb7efa1f9aea to your computer and use it in GitHub Desktop.
Save esmerino/5efca773d1d7ed5d8d07fb7efa1f9aea to your computer and use it in GitHub Desktop.
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