2014-11-13 10:42:44 +00:00
|
|
|
################################################################################
|
|
|
|
# Build a dockerfile for Prosody XMPP server
|
|
|
|
# Based on ubuntu
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
FROM ubuntu:14.04
|
|
|
|
|
|
|
|
MAINTAINER Lloyd Watkin <lloyd@evilprofessor.co.uk>
|
|
|
|
|
2014-12-08 02:59:37 +00:00
|
|
|
# Install dependencies
|
|
|
|
RUN apt-get update \
|
|
|
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
|
|
|
libidn11 \
|
|
|
|
liblua5.1-expat0 \
|
|
|
|
libssl1.0.0 \
|
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 \
|
|
|
|
openssl \
|
|
|
|
&& 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
|
|
|
|
|
|
|
|
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"]
|