forked from toke/docker-mosquitto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile~
52 lines (46 loc) · 1.54 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
FROM ubuntu:latest
MAINTAINER Joerg Wende <[email protected]>
# origin: Thomas Kerpe
# update based on Ansgar Schmidt
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install wget build-essential libwrap0-dev libssl-dev python-distutils-extra libc-ares-dev uuid-dev -y
RUN mkdir -p /usr/local/src
WORKDIR /usr/local/src
#WebSockets
RUN apt-get install cmake -y
RUN wget http://git.warmcat.com/cgi-bin/cgit/libwebsockets/snapshot/libwebsockets-1.5-chrome47-firefox41.tar.gz
RUN tar -xzvf libwebsockets-1.5-chrome47-firefox41.tar.gz
RUN cd libwebsockets-1.5-chrome47-firefox41
RUN mkdir build
RUN cd build
WORKDIR /usr/local/src/libwebsockets-1.5-chrome47-firefox41/build
RUN cmake ..
RUN make
RUN make install
RUN ldconfig
#Mosquitto
RUN cd /usr/local/src
WORKDIR /usr/local/src
RUN wget http://mosquitto.org/files/source/mosquitto-1.4.5.tar.gz
RUN tar xvzf ./mosquitto-1.4.5.tar.gz
RUN cd /usr/local/src/mosquitto-1.4.5
WORKDIR /usr/local/src/mosquitto-1.4.5
COPY make/config.mk /usr/local/src/mosquitto-1.4.5/config.mk
RUN make
RUN make install
#RUN apt-get install python-software-properties -y
#RUN apt-get install software-properties-common -y
#RUN apt-add-repository ppa:mosquitto-dev/mosquitto-ppa
#RUN apt-get update
#RUN apt-get install mosquitto -y
WORKDIR /home
RUN adduser --system --disabled-password --disabled-login mosquitto
RUN mkdir /mqtt
COPY config /mqtt/config
RUN mkdir /mqtt/data
RUN mkdir /mqtt/log
RUN chown -hR mosquitto /mqtt
VOLUME ["/mqtt/config", "/mqtt/data", "/mqtt/log"]
EXPOSE 1883 9001
CMD mosquitto -c /mqtt/config/mosquitto.conf