-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (27 loc) · 839 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
32
33
34
35
36
FROM ubuntu:14.04
ENV MONIT_VERSION 5.18
RUN apt-get update && apt-get install -y wget \
tar \
build-essential \
ca-certificates \
gcc \
git \
libpq-dev \
make \
python-pip \
python2.7 \
python2.7-dev \
&& apt-get autoremove \
&& apt-get clean
RUN wget -O /tmp/monit-$MONIT_VERSION-linux-x64.tar.gz http://mmonit.com/monit/dist/binary/$MONIT_VERSION/monit-$MONIT_VERSION-linux-x64.tar.gz
RUN cd /tmp && tar -xzf /tmp/monit-$MONIT_VERSION-linux-x64.tar.gz && cp /tmp/monit-$MONIT_VERSION/bin/monit /usr/bin/monit
COPY ./monitrc /etc/monitrc
RUN chmod 0700 /etc/monitrc
RUN mkdir scripts
COPY scripts /scripts
RUN pip install -r /scripts/requirements.txt
COPY mqtt_publisher /etc/init.d/
RUN chmod +x /etc/init.d/mqtt_publisher
COPY ./conf.d /etc/monit/conf.d
EXPOSE 2812
CMD monit -I