FROM sutty/monit-build:latest AS build RUN apk add --no-cache tzdata RUN echo /home/builder/packages/home > /etc/apk/repositories RUN apk add --no-cache monit FROM alpine:3.11 MAINTAINER "f " # 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 # Install monit and remove default config RUN apk add --no-cache tini COPY --from=build /usr/bin/monit /usr/bin/monit COPY --from=build /usr/share/zoneinfo/UTC /etc/localtime # 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 # 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"]