ARG BASE_IMAGE=registry.nulo.in/sutty/ruby ARG ALPINE_VERSION=3.13.6 ARG RUBY_VERSION=2.7 ARG RUBY_PATCH=5 ARG EMAIL=monit@sutty.nl FROM ${BASE_IMAGE}:${ALPINE_VERSION}-${RUBY_VERSION}.${RUBY_PATCH} ARG ALPINE_VERSION MAINTAINER f ENV RAILS_ENV production RUN getent group 82 || addgroup -g 82 -S www-data RUN adduser -s /bin/sh -G www-data -h /srv -D rails RUN install -dm 750 -o rails -g www-data /srv RUN apk add --no-cache jemalloc daemonize libxslt libxml2 RUN gem install --no-document --no-user-install foreman COPY ./monit.conf /etc/monit.d/rails.conf COPY ./Procfile /etc/Procfile COPY ./entrypoint.sh /usr/local/bin/rails VOLUME /srv EXPOSE 3000 EXPOSE 9394