grim/containers/prosody

set consider_bosh_secure to true

2020-01-07, Gary Kramlich
75f4e4d9e0c5
set consider_bosh_secure to true
# vi:et:ts=4 sw=4 sts=4
FROM debian:buster-slim
RUN set -ex && \
apt-get update && \
apt-get install -y --no-install-recommends \
build-essential ca-certificates pkg-config wget \
lua5.2 liblua5.2-dev \
libidn11-dev libidn2-dev libssl-dev \
lua-bitop lua-dbi-sqlite3 lua-event lua-expat \
lua-filesystem lua-sec lua-socket \
vim procps \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists
# create the prosody user and it's home dir
RUN set -ex && \
useradd -u 101 -d /var/lib/prosody -U -m -r -s /bin/false prosody
# download and install prosody from an hg archive
RUN set -ex && \
cd /tmp && \
mkdir prosody && \
wget https://hg.prosody.im/trunk/archive/tip.tar.gz && \
tar -C prosody --strip-components=1 -zxf tip.tar.gz && \
rm -f tip.tar.gz && \
cd prosody && \
./configure --ostype=debian --prefix=/usr && \
make -j $(nproc) && \
make install && \
cd .. && \
rm -rf prosody && \
mkdir -p /etc/prosody/conf.d/ /etc/prosody/secrets.d/
# download and install prosody-modules from an hg archive
RUN set -ex && \
cd /tmp && \
wget https://hg.prosody.im/prosody-modules/archive/tip.tar.gz && \
tar -C /usr/lib/prosody/modules --strip-components=1 -zxf tip.tar.gz && \
rm -rf tip.tar.gz
# download and install the prosody jetbrains hub auth module
RUN set -ex && \
cd /tmp && \
wget https://hg.sr.ht/~grim/prosody_mod_auth_jetbrains_hub/archive/tip.tar.gz && \
mkdir -p /usr/lib/prosody/modules/mod_auth_jetbrains_hub/ && \
tar -C /usr/lib/prosody/modules/mod_auth_jetbrains_hub/ --strip-components=1 -zxf tip.tar.gz && \
rm -rf tip.tar.gz
COPY prosody.cfg.lua /etc/prosody/prosody.cfg.lua
RUN set -ex && \
mkdir -p /run/prosody/ && \
chown -R prosody:prosody /run/prosody/
# client to server
EXPOSE 5222
# server to server
EXPOSE 5269
# bosh
EXPOSE 5280 5281
CMD ["prosodyctl", "start"]
USER prosody