-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.txt
40 lines (18 loc) · 1.05 KB
/
Dockerfile.txt
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
FROM resin/rpi-raspbian:jessie
MAINTAINER Pascal de Vink <[email protected]>
LABEL Description="Edited from github.com-pascaldevink-rpi-mosquittoclipse"
RUN apt-get update && apt-get install -y iputils-ping
RUN apt-get update && apt-get install -y apt-utils && apt-get install -y wget
RUN apt-get install -y apt-transport-https
RUN wget -q -O - http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key | apt-key add -
RUN wget -q -O /etc/apt/sources.list.d/mosquitto-jessie.list http://repo.mosquitto.org/debian/mosquitto-jessie.list
RUN apt-get update && apt-get install -y mosquitto && apt-get install -y mosquitto-clients
RUN adduser --system --disabled-password --disabled-login mosquitto
RUN mkdir -p /mqtt/config /mqtt/data /mqtt/log
COPY config /mqtt/config
RUN chown -R mosquitto:mosquitto /mqtt
VOLUME ["/mqtt/config", "/mqtt/data", "/mqtt/log"]
EXPOSE 1883 9001
ADD docker-entrypoint.sh /usr/bin/
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["/usr/sbin/mosquitto","-c","/mqtt/config/mosquitto.conf"]