mosquitto-docker-letsencrypt/Dockerfile

45 lines
918 B
Docker
Raw Normal View History

2020-08-08 13:40:44 +00:00
FROM python:3-alpine
LABEL maintainer synoniem https://github.com/synoniem
2018-10-24 19:18:46 +00:00
# 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 \
2021-01-09 10:57:05 +00:00
curl \
2020-08-08 13:40:44 +00:00
py3-crypto \
2018-10-24 19:18:46 +00:00
ca-certificates \
2020-08-08 13:40:44 +00:00
certbot \
2018-10-24 19:18:46 +00:00
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
2021-01-09 10:57:05 +00:00
CMD ["/bin/bash","-c","/run.sh"]