-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDockerfile
66 lines (41 loc) · 1.28 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
FROM ubuntu:24.10
LABEL maintainer="[email protected]"
#install pip3
RUN apt update
RUN apt install -yqq python3-pip
#install python paho-mqtt client and urllib3
RUN pip3 install --upgrade pip setuptools --no-cache-dir && \
pip3 install paho-mqtt==1.6.1 --no-cache-dir && \
pip3 install urllib3 --no-cache-dir && \
pip3 install loguru --no-cache-dir && \
pip3 install requests --no-cache-dir && \
pip3 install apprise --no-cache-dir && \
pip3 install websocket-client --no-cache-dir && \
pip3 install whatsapp-api-client-python --no-cache-dir
ENV PYTHONIOENCODING=utf-8
ENV LANG=C.UTF-8
#Mqtt broker address (ip or fqdn)
ENV MQTT_HOST "127.0.0.1"
#Mqtt broker port - 1883 is the common
ENV MQTT_PORT "1883"
#Mqtt broker username
ENV MQTT_USER "user"
#Mqtt broker password
ENV MQTT_PASS "password"
#Debug Mode for testing
ENV DEBUG_MODE "False"
ENV REGION "*"
ENV NOTIFIERS ""
ENV INCLUDE_TEST_ALERTS "False"
ENV MQTT_TOPIC "/redalert"
ENV GREEN_API_INSTANCE ""
ENV GREEN_API_TOKEN ""
ENV WHATSAPP_NUMBER ""
#Create working directory
RUN mkdir /opt/redalert
COPY redalert.py /opt/redalert
#Cleanup
#RUN apt remove python3-pip --yes && \
# apt autoremove --yes && \
# rm -rf /var/cache/*
ENTRYPOINT ["/usr/bin/python3", "/opt/redalert/redalert.py"]