2018-09-02 14:08:36 +00:00
|
|
|
FROM alpine:3.8
|
2018-02-28 18:24:43 +00:00
|
|
|
|
2020-09-12 12:18:33 +00:00
|
|
|
LABEL maintainer="Luis Miguel Vicente Fuentes"
|
2018-02-28 18:24:43 +00:00
|
|
|
|
|
|
|
# monit environment variables
|
2020-09-12 12:16:26 +00:00
|
|
|
ENV MONIT_VERSION=5.27.0 \
|
2018-02-28 18:24:43 +00:00
|
|
|
MONIT_HOME=/opt/monit \
|
|
|
|
MONIT_URL=https://mmonit.com/monit/dist \
|
|
|
|
PATH=$PATH:/opt/monit/bin
|
|
|
|
|
2020-09-12 12:16:26 +00:00
|
|
|
# compile and install monit
|
2018-02-28 18:24:43 +00:00
|
|
|
RUN \
|
|
|
|
apk add --update gcc musl-dev make 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 libressl-dev file zlib-dev && \
|
|
|
|
rm -rf /var/cache/apk/* /opt/src
|
|
|
|
|
|
|
|
EXPOSE 2812
|
|
|
|
|
|
|
|
CMD ["monit", "-I", "-B"]
|