-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
31 lines (24 loc) · 963 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM alpine:3.20.2
LABEL maintainer="Diogo Serrano <info@diogoserrano.com>"
# monit environment variables
ENV MONIT_VERSION=5.26.0 \
MONIT_HOME=/opt/monit \
MONIT_URL=https://mmonit.com/monit/dist \
PATH=$PATH:/opt/monit/bin
COPY slack /bin/slack
COPY pushover /bin/pushover
# Compile and install monit
RUN \
apk add --update gcc musl-dev make bash python3 curl libressl-dev file zlib-dev && \
mkdir -p /opt/src; cd /opt/src && \
wget -qO- ${MONIT_URL}/monit-${MONIT_VERSION}.tar.gz | tar xz && \
cd /opt/src/monit-${MONIT_VERSION} && \
./configure --prefix=${MONIT_HOME} --without-pam && \
make && make install && \
apk del gcc musl-dev make file zlib-dev && \
rm -rf /var/cache/apk/* /opt/src
EXPOSE 2812
COPY docker-entrypoint.sh /usr/local/bin/
RUN ln -s /usr/local/bin/docker-entrypoint.sh /entrypoint.sh # backwards compat
ENTRYPOINT ["/entrypoint.sh"]
CMD ["monit", "-I", "-B", "-c", "/etc/monitrc_root"]