-
Notifications
You must be signed in to change notification settings - Fork 20
/
Dockerfile
executable file
·43 lines (38 loc) · 900 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
37
38
39
40
41
42
43
FROM python:2.7-alpine
LABEL maintainer bitrox <proxy@bitrox.io>
# Set environment variables.
ENV TERM=xterm-color
ENV SHELL=/bin/bash
RUN \
mkdir /mosquitto && \
mkdir /mosquitto/log && \
mkdir /mosquitto/conf && \
apk update && \
apk upgrade && \
apk add \
bash \
coreutils \
nano \
py-crypto \
ca-certificates \
certbot \
mosquitto \
mosquitto-clients && \
rm -f /var/cache/apk/* && \
pip install --upgrade pip && \
pip install pyRFC3339 configobj ConfigArgParse
COPY run.sh /run.sh
COPY certbot.sh /certbot.sh
COPY restart.sh /restart.sh
COPY croncert.sh /etc/periodic/weekly/croncert.sh
RUN \
chmod +x /run.sh && \
chmod +x /certbot.sh && \
chmod +x /restart.sh && \
chmod +x /etc/periodic/weekly/croncert.sh
EXPOSE 1883
EXPOSE 8883
EXPOSE 80
# This will run any scripts found in /scripts/*.sh
# then start Apache
CMD ["/bin/bash","-c","/run.sh"]