-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
26 lines (19 loc) · 1.12 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
FROM ansi/mosquitto
MAINTAINER Alex Kritikos <[email protected]>
USER root
RUN sudo apt-get update
RUN sudo apt-get upgrade -y
RUN apt-get install openssl git augeas-lenses dialog libaugeas0 libexpat1-dev libffi-dev libpython-dev libpython2.7 libpython2.7-dev python-dev python-pkg-resources python-setuptools python-virtualenv python2.7-dev -y
RUN echo 'root:Mosquitto!' | chpasswd
RUN mkdir -p /etc/mosquitto
WORKDIR /etc/mosquitto
#RUN chown -R mosquitto /etc/mosquitto
#RUN wget https://letsencrypt.org/certs/isrgrootx1.pem
#USER mosquitto
RUN git clone https://github.com/certbot/certbot
WORKDIR /etc/mosquitto/certbot
#USER root
#RUN ./certbot-auto certonly --standalone -n -v --agree-tos --email [email protected] -d example.com -d www.example.com --config-dir /etc/mosquitto --work-dir /etc/mosquitto --logs-dir /etc/mosquitto
RUN ./letsencrypt-auto certonly --email [email protected] --text --authenticator manual --work-dir /etc/mosquitto --config-dir /etc/mosquitto --logs-dir /etc/mosquitto auth --cert-path /etc/mosquitto/certs/ --chain-path /etc/mosquitto/chains/ --csr /etc/mosquitto/domain.csr
USER mosquitto
RUN printenv