2014-11-13 10:42:44 +00:00
|
|
|
################################################################################
|
|
|
|
# Build a dockerfile for Prosody XMPP server
|
|
|
|
# Based on ubuntu
|
|
|
|
################################################################################
|
|
|
|
|
2019-01-14 11:28:19 +00:00
|
|
|
FROM debian:9
|
2014-11-13 10:42:44 +00:00
|
|
|
|
2019-01-14 11:28:19 +00:00
|
|
|
MAINTAINER Prosody Developers <developers@prosody.im>
|
|
|
|
|
|
|
|
# Some dependencies in stretch are not suitable for Prosody 0.11.x, so add our repo
|
|
|
|
RUN echo "deb http://packages.prosody.im/debian stretch main" > /etc/apt/sources.list.d/prosody.list
|
|
|
|
ADD prosody_packages.gpg /etc/apt/trusted.gpg.d/prosody.gpg
|
2019-01-14 12:19:03 +00:00
|
|
|
RUN chmod a+r /etc/apt/trusted.gpg.d/prosody.gpg
|
2014-11-13 10:42:44 +00:00
|
|
|
|
2014-12-08 02:59:37 +00:00
|
|
|
# Install dependencies
|
|
|
|
RUN apt-get update \
|
|
|
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
2017-10-20 01:39:45 +00:00
|
|
|
lsb-base \
|
|
|
|
adduser \
|
2014-12-08 02:59:37 +00:00
|
|
|
libidn11 \
|
2019-01-14 11:28:19 +00:00
|
|
|
libssl1.1 \
|
2016-02-04 19:24:01 +00:00
|
|
|
lua-bitop \
|
2014-12-08 02:59:37 +00:00
|
|
|
lua-dbi-mysql \
|
|
|
|
lua-dbi-postgresql \
|
|
|
|
lua-dbi-sqlite3 \
|
|
|
|
lua-event \
|
|
|
|
lua-expat \
|
|
|
|
lua-filesystem \
|
|
|
|
lua-sec \
|
|
|
|
lua-socket \
|
|
|
|
lua-zlib \
|
|
|
|
lua5.1 \
|
2019-01-14 11:42:51 +00:00
|
|
|
lua5.2 \
|
2014-12-08 02:59:37 +00:00
|
|
|
openssl \
|
2016-08-08 10:58:44 +00:00
|
|
|
ca-certificates \
|
2017-10-20 01:39:45 +00:00
|
|
|
ssl-cert \
|
2014-12-08 02:59:37 +00:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
# Install and configure prosody
|
|
|
|
COPY ./prosody.deb /tmp/prosody.deb
|
|
|
|
RUN dpkg -i /tmp/prosody.deb \
|
|
|
|
&& sed -i '1s/^/daemonize = false;\n/' /etc/prosody/prosody.cfg.lua \
|
|
|
|
&& perl -i -pe 'BEGIN{undef $/;} s/^log = {.*?^}$/log = {\n {levels = {min = "info"}, to = "console"};\n}/smg' /etc/prosody/prosody.cfg.lua
|
|
|
|
|
2019-01-14 11:43:13 +00:00
|
|
|
RUN mkdir -p /var/run/prosody && chown prosody:prosody /var/run/prosody
|
|
|
|
|
2014-12-08 02:59:37 +00:00
|
|
|
COPY ./entrypoint.sh /entrypoint.sh
|
2016-03-11 15:51:35 +00:00
|
|
|
RUN chmod 755 /entrypoint.sh
|
2014-12-08 02:59:37 +00:00
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
|
|
|
|
|
|
EXPOSE 80 443 5222 5269 5347 5280 5281
|
2016-02-04 19:17:11 +00:00
|
|
|
USER prosody
|
|
|
|
ENV __FLUSH_LOG yes
|
|
|
|
CMD ["prosody"]
|