2020-02-22 10:41:51 +00:00
|
|
|
FROM balenalib/rpi-raspbian
|
2016-10-18 20:20:59 +00:00
|
|
|
|
|
|
|
RUN apt-get update \
|
|
|
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
2018-11-27 19:33:37 +00:00
|
|
|
libevent-dev `# this is no build dependency, but needed for luaevent` \
|
2020-05-25 16:51:40 +00:00
|
|
|
libidn11 \
|
2018-11-27 19:33:37 +00:00
|
|
|
lua5.2 \
|
2018-01-13 23:31:10 +00:00
|
|
|
lua-bitop \
|
2016-10-18 20:20:59 +00:00
|
|
|
lua-expat \
|
|
|
|
lua-filesystem \
|
|
|
|
lua-socket \
|
|
|
|
lua-sec \
|
2018-11-27 19:33:37 +00:00
|
|
|
sqlite3 \
|
2016-10-18 20:20:59 +00:00
|
|
|
wget \
|
|
|
|
&& apt-get clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2020-05-25 15:54:28 +00:00
|
|
|
ENV PROSODY_VERSION 0.11.5
|
2016-10-18 20:20:59 +00:00
|
|
|
ENV PROSODY_DOWNLOAD_URL https://prosody.im/downloads/source/prosody-${PROSODY_VERSION}.tar.gz
|
2020-05-25 15:54:28 +00:00
|
|
|
ENV PROSODY_DOWNLOAD_SHA1 fbe27d3203671a6ecd5ba8233dc4c113fd76cd2e
|
2020-05-25 16:30:14 +00:00
|
|
|
ENV LUAROCKS_VERSION 3.3.1
|
2016-10-18 20:20:59 +00:00
|
|
|
|
2018-11-27 19:33:37 +00:00
|
|
|
RUN buildDeps='gcc git libc6-dev libidn11-dev liblua5.2-dev libsqlite3-dev libssl-dev make unzip' \
|
2016-10-18 20:20:59 +00:00
|
|
|
&& set -x \
|
|
|
|
&& apt-get update && apt-get install -y $buildDeps --no-install-recommends \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
2018-11-27 19:33:37 +00:00
|
|
|
\
|
2016-12-27 13:43:47 +00:00
|
|
|
&& wget -O prosody.tar.gz "${PROSODY_DOWNLOAD_URL}" \
|
|
|
|
&& echo "${PROSODY_DOWNLOAD_SHA1} *prosody.tar.gz" | sha1sum -c - \
|
2016-10-18 20:20:59 +00:00
|
|
|
&& mkdir -p /usr/src/prosody \
|
|
|
|
&& tar -xzf prosody.tar.gz -C /usr/src/prosody --strip-components=1 \
|
|
|
|
&& rm prosody.tar.gz \
|
2018-11-27 19:33:37 +00:00
|
|
|
&& cd /usr/src/prosody && ./configure \
|
2020-05-25 16:50:57 +00:00
|
|
|
&& make \
|
|
|
|
&& make install \
|
2018-11-27 19:33:37 +00:00
|
|
|
&& cd / && rm -r /usr/src/prosody \
|
|
|
|
\
|
|
|
|
&& mkdir /usr/src/luarocks \
|
|
|
|
&& cd /usr/src/luarocks \
|
2020-05-25 16:30:14 +00:00
|
|
|
&& wget https://luarocks.org/releases/luarocks-${LUAROCKS_VERSION}.tar.gz \
|
|
|
|
&& tar zxpf luarocks-${LUAROCKS_VERSION}.tar.gz \
|
|
|
|
&& cd luarocks-${LUAROCKS_VERSION} \
|
2018-11-27 19:33:37 +00:00
|
|
|
&& ./configure \
|
|
|
|
&& sudo make bootstrap \
|
|
|
|
&& cd / && rm -r /usr/src/luarocks \
|
|
|
|
\
|
|
|
|
&& luarocks install luaevent \
|
|
|
|
&& luarocks install luadbi \
|
|
|
|
&& luarocks install luadbi-sqlite3 \
|
|
|
|
\
|
2016-10-18 20:20:59 +00:00
|
|
|
&& apt-get purge -y --auto-remove $buildDeps
|
|
|
|
|
|
|
|
EXPOSE 5000 5222 5269 5347 5280 5281
|
|
|
|
|
|
|
|
RUN groupadd -r prosody \
|
|
|
|
&& useradd -r -g prosody prosody \
|
|
|
|
&& chown prosody:prosody /usr/local/var/lib/prosody
|
|
|
|
|
|
|
|
# https://github.com/prosody/prosody-docker/issues/25
|
|
|
|
ENV __FLUSH_LOG yes
|
|
|
|
|
|
|
|
VOLUME ["/usr/local/var/lib/prosody"]
|
|
|
|
|
|
|
|
COPY prosody.cfg.lua /usr/local/etc/prosody/prosody.cfg.lua
|
|
|
|
COPY docker-entrypoint.sh /entrypoint.sh
|
|
|
|
COPY conf.d/*.cfg.lua /usr/local/etc/prosody/conf.d/
|
|
|
|
|
|
|
|
COPY docker-prosody-module-* /usr/local/bin/
|
|
|
|
RUN docker-prosody-module-install \
|
|
|
|
blocking `# blocking command (XEP-0191)` \
|
|
|
|
carbons `# message carbons (XEP-0280)` \
|
|
|
|
csi `# client state indication (XEP-0352)` \
|
|
|
|
e2e_policy `# require end-2-end encryption` \
|
|
|
|
filter_chatstates `# disable "X is typing" type messages` \
|
|
|
|
http_upload `# file sharing (XEP-0363)` \
|
|
|
|
smacks `# stream management (XEP-0198)` \
|
|
|
|
throttle_presence `# presence throttling in CSI`
|
|
|
|
|
|
|
|
USER prosody
|
|
|
|
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
2020-05-26 15:27:48 +00:00
|
|
|
CMD ["prosody", "-F"]
|
2018-11-27 19:33:37 +00:00
|
|
|
|