ARG RUBY_VERSION ARG ALPINE_VERSION FROM ruby:$RUBY_VERSION-alpine$ALPINE_VERSION

ARG BUNDLER_VERSION

RUN apk add –update –no-cache \

bash \
build-base \
postgresql-client \
postgresql-dev \
nodejs-current \
git \
imagemagick \
tzdata

RUN apk add –no-cache yarn –repository=“dl-cdn.alpinelinux.org/alpine/edge/community

# Configure bundler and PATH ENV LANG=C.UTF-8 \

GEM_HOME=/bundle \
BUNDLE_JOBS=4 \
BUNDLE_RETRY=3

ENV BUNDLE_PATH $GEM_HOME ENV BUNDLE_APP_CONFIG=$BUNDLE_PATH \

BUNDLE_BIN=$BUNDLE_PATH/bin

ENV PATH /app/bin:$BUNDLE_BIN:$PATH

RUN gem update –system && \

gem install bundler:$BUNDLER_VERSION

RUN mkdir -p /app

WORKDIR /app