-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
59 lines (51 loc) · 2.62 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
53
54
55
56
57
58
59
FROM debian:bullseye-slim
ENV DEBIAN_FRONTEND noninteractive
ENV __FLUSH_LOG yes
ENV HTTP_FILE_UPLOAD_SIZE 10 * 1024 * 1024 -- bytes
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gnupg2 \
lsb-release \
sasl2-bin \
libsasl2-modules \
openssl \
ca-certificates \
supervisor \
prosody \
prosody-modules \
lua-bitop \
lua-cyrussasl \
lua-dbi-sqlite3 \
lua-dbi-mysql \
lua-dbi-postgresql \
lua-sec \
lua-zlib && \
rm -rf /var/lib/apt/lists/* && \
sed -i 's/daemonize = true;/daemonize = false;/g' /etc/prosody/prosody.cfg.lua && \
sed -i 's/--"http_files";/"http_upload"; -- Enable file upload XEP-0363\n &/g' /etc/prosody/prosody.cfg.lua && \
sed -i 's/"vcard_legacy";/"filter_chatstates"; -- filter chat states when clients indicate they are inactive\n &/g' /etc/prosody/prosody.cfg.lua && \
sed -i 's/"vcard_legacy";/"throttle_presence"; -- automatically cuts down on presence traffic when clients indicate they are inactive\n &/g' /etc/prosody/prosody.cfg.lua && \
sed -i 's/"vcard_legacy";/"smacks"; -- XEP-0198: Reliability and fast reconnects for XMPP\n &/g' /etc/prosody/prosody.cfg.lua && \
sed -i 's/"vcard_legacy";/"cloud_notify"; -- XEP-0357: Push Notifications\n &/g' /etc/prosody/prosody.cfg.lua && \
sed -i 's/--"csi_simple";/"csi_simple";/g' /etc/prosody/prosody.cfg.lua && \
sed -i 's/--"bosh";/"bosh";/g' /etc/prosody/prosody.cfg.lua && \
sed -i 's/--"mam";/"mam";/g' /etc/prosody/prosody.cfg.lua && \
sed -i 's/--"proxy65";/"proxy65";/g' /etc/prosody/prosody.cfg.lua && \
sed -i 's/--"websocket";/"websocket";/g' /etc/prosody/prosody.cfg.lua && \
sed -i 's/c2s_require_encryption = false/c2s_require_encryption = true/g' /etc/prosody/prosody.cfg.lua && \
sed -i 's/authentication = "internal_plain"/authentication = "cyrus"/g' /etc/prosody/prosody.cfg.lua && \
sed -i 's/authentication = "internal_hashed"/authentication = "cyrus"/g' /etc/prosody/prosody.cfg.lua && \
mkdir /var/run/prosody && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
chown prosody:prosody -Rf /etc/prosody /var/run/prosody
COPY ./host_skel.cfg.lua /etc/prosody/conf.avail/
COPY ./sasl_prosody.conf /etc/sasl/prosody.conf
RUN adduser prosody sasl
# Configure supervisor
COPY ./supervisor/* /etc/supervisor/conf.d/
COPY ./entrypoint.sh /entrypoint.sh
RUN chmod 755 /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 5000 5222 5269 5280 5281
CMD ["prosody"]