Skip to content

Commit 9638667

Browse files
author
Ke, Mingze
committed
initial commit
0 parents  commit 9638667

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

Dockerfile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
FROM debian:jessie
2+
3+
ENV DEBIAN_FRONTEND noninteractive
4+
5+
VOLUME ["/var/lib/mosquitto", "/etc/mosquitto"]
6+
7+
RUN buildDeps='wget build-essential cmake bzip2 mercurial git libwrap0-dev libssl-dev libc-ares-dev xsltproc docbook docbook-xsl uuid-dev zlib1g-dev'; \
8+
mkdir -p /var/lib/mosquitto && \
9+
touch /var/lib/mosquitto/.keep && \
10+
apt-get update -q && \
11+
apt-get install -qy $buildDeps openssl --no-install-recommends && \
12+
wget -O - http://git.warmcat.com/cgi-bin/cgit/libwebsockets/snapshot/libwebsockets-1.4-chrome43-firefox-36.tar.gz | tar -zxvf - && \
13+
cd libwebsockets-1.4-chrome43-firefox-36/ && \
14+
mkdir build && \
15+
cd build && \
16+
cmake .. -DLWS_WITH_HTTP2=1 -DLWS_WITHOUT_TESTAPPS=1 && \
17+
make && \
18+
make install && \
19+
ldconfig -v && \
20+
cd / && rm -rf libwebsockets-1.4-chrome43-firefox-36/ && \
21+
git clone git://git.eclipse.org/gitroot/mosquitto/org.eclipse.mosquitto.git && \
22+
cd org.eclipse.mosquitto && \
23+
sed -i "s/WITH_WEBSOCKETS:=no/WITH_WEBSOCKETS:=yes/" config.mk && \
24+
make && \
25+
make install && \
26+
cd / && rm -rf org.eclipse.mosquitto && \
27+
apt-get purge -y --auto-remove $buildDeps
28+
29+
RUN groupadd -r mosquitto && \
30+
useradd -r -g mosquitto mosquitto
31+
32+
CMD ["mosquitto", "-c", "/etc/mosquitto/mosquitto.conf"]

0 commit comments

Comments
 (0)