containers-rails/Dockerfile

25 lines
708 B
Text
Raw Normal View History

ARG BASE_IMAGE=gitea.nulo.in/sutty/ruby
ARG ALPINE_VERSION=3.18.4
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
LABEL org.opencontainers.image.authors="f@sutty.nl"
2022-03-01 13:03:53 +00:00
ENV RAILS_ENV production
2021-03-27 13:47:17 +00:00
2022-03-07 19:20:32 +00:00
RUN getent group 82 || addgroup -g 82 -S www-data
2022-03-01 13:03:53 +00:00
RUN adduser -s /bin/sh -G www-data -h /srv -D rails
RUN install -dm 750 -o rails -g www-data /srv
2022-04-02 14:27:25 +00:00
RUN apk add --no-cache jemalloc daemonize libxslt libxml2
2022-04-02 14:26:57 +00:00
RUN gem install --no-document --no-user-install foreman
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