containers-monit/Dockerfile

33 lines
918 B
Text
Raw Normal View History

2019-09-10 23:24:35 +00:00
FROM alpine:3.10
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
RUN apk add --no-cache tini monit && rm -f /etc/monitrc
# 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
COPY ./monit /etc/monit.d/monit.conf~
COPY ./allow_networks.sh /usr/local/bin/allow_networks
# Set permissions
RUN chmod 700 /etc/monitrc /etc/monit.d/monit.conf~
RUN chmod 755 /usr/local/bin/allow_networks
# Allow access to the web GUI
EXPOSE 2812
# Use tini as init
ENTRYPOINT ["/sbin/tini", "--"]
# Run monit, it will take care of running services afterwards
CMD ["/usr/bin/monit"]