ARG ALPINE_VERSION=3.18.3 ARG BASE_IMAGE=gitea.nulo.in/sutty/sutty FROM ${BASE_IMAGE}:${ALPINE_VERSION} as build COPY ./monitrc /etc/monitrc RUN chmod 600 /etc/monitrc FROM ${BASE_IMAGE}:${ALPINE_VERSION} MAINTAINER "f " ENV EMAIL=monit@sutty.nl ENV EMAIL_FROM=monit@sutty.nl ENV MMONIT=mmmonit.athshe.sutty.nl ENV CREDENTIALS=mmmonit:mmmonit.athshe.sutty.nl # Install monit and remove default config RUN apk add --no-cache tini monit knsupdate # Create directories RUN install -dm 2750 -o root -g root /etc/monit.d RUN install -dm 2750 -o root -g root /etc/monit.d/external/ RUN install -dm 2750 -o root -g root /var/lib/monit # Install config COPY --from=build /etc/monitrc /etc/monitrc COPY ./nsupdate.sh /usr/local/bin/nsupdate COPY ./whatsmyip6.sh /usr/local/bin/whatsmyip6 COPY ./syslogize.sh /usr/local/bin/syslogize COPY ./zeroconf.sh /usr/local/bin/zeroconf COPY ./zeroconf.conf /etc/zeroconf.conf # 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"]