containers-rails/Dockerfile

36 lines
1,007 B
Text
Raw Normal View History

2020-07-18 23:00:59 +00:00
FROM alpine:3.12 AS build
RUN apk add --no-cache tzdata
2020-07-18 23:00:59 +00:00
FROM alpine:3.12
2019-09-10 23:10:18 +00:00
MAINTAINER "f <f@sutty.nl>"
2019-09-10 23:24:35 +00:00
2019-09-11 00:11:06 +00:00
# TODO: We don't want to receive lots of email, so we'll change this to
# a pingy instance that will also work as a status site.
ENV EMAIL monit@sutty.nl
2019-09-10 23:24:35 +00:00
# Install monit and remove default config
2020-06-01 15:54:38 +00:00
RUN apk add --no-cache tini monit
COPY --from=build /usr/share/zoneinfo/UTC /etc/localtime
2019-09-10 23:24:35 +00:00
# Create directories
RUN install -dm 2750 -o root -g root /etc/monit.d
RUN install -dm 2750 -o root -g root /var/lib/monit
# Install config. monit.conf~ will be activated after allow_networks
# runs.
COPY ./monitrc /etc/monitrc
RUN chmod 600 /etc/monitrc
2019-09-10 23:24:35 +00:00
# Allow access to the web GUI
EXPOSE 2812
2020-06-01 15:54:38 +00:00
# Sutty's repository
2020-07-18 23:00:59 +00:00
RUN echo 'https://alpine.sutty.nl/alpine/v3.12/sutty' >> /etc/apk/repositories
2020-06-01 21:19:22 +00:00
RUN wget https://alpine.sutty.nl/alpine/sutty.pub -O /etc/apk/keys/sutty.pub
2020-06-01 15:54:38 +00:00
2019-09-10 23:24:35 +00:00
# Use tini as init
ENTRYPOINT ["/sbin/tini", "--"]
# Run monit, it will take care of running services afterwards
CMD ["/usr/bin/monit"]