containers-rails/Dockerfile

24 lines
594 B
Text
Raw Normal View History

2022-03-01 13:03:53 +00:00
ARG BASE_IMAGE=registry.nulo.in/sutty/ruby
2021-10-03 23:19:00 +00:00
ARG ALPINE_VERSION=3.13.6
ARG RUBY_VERSION=2.7
ARG RUBY_PATCH=5
2022-03-01 13:03:53 +00:00
ARG EMAIL=monit@sutty.nl
FROM ${BASE_IMAGE}:${ALPINE_VERSION}-${RUBY_VERSION}.${RUBY_PATCH}
ARG ALPINE_VERSION
MAINTAINER f <f@sutty.nl>
ENV RAILS_ENV production
2021-03-27 13:47:17 +00:00
2022-03-01 13:03:53 +00:00
RUN 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
2022-03-01 13:03:53 +00:00
RUN apk add --no-cache jemalloc daemonize
2019-09-10 23:24:35 +00:00
2022-03-01 13:03:53 +00:00
COPY ./monit.conf /etc/monit.d/rails.conf
COPY ./Procfile /etc/Procfile
COPY ./entrypoint.sh /usr/local/bin/rails
2021-03-27 13:47:25 +00:00
2022-03-01 13:03:53 +00:00
VOLUME /srv
EXPOSE 3000
EXPOSE 9394