prosody-docker/Dockerfile
2017-10-20 03:40:34 +02:00

46 lines
1.3 KiB
Docker

################################################################################
# Build a dockerfile for Prosody XMPP server
# Based on ubuntu
################################################################################
FROM ubuntu:14.04
MAINTAINER Lloyd Watkin <lloyd@evilprofessor.co.uk>
# Install dependencies
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
lsb-base \
adduser \
libidn11 \
libssl1.0.0 \
lua-bitop \
lua-dbi-mysql \
lua-dbi-postgresql \
lua-dbi-sqlite3 \
lua-event \
lua-expat \
lua-filesystem \
lua-sec \
lua-socket \
lua-zlib \
lua5.1 \
openssl \
ca-certificates \
ssl-cert \
&& 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
RUN chmod 755 /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 80 443 5222 5269 5347 5280 5281
USER prosody
ENV __FLUSH_LOG yes
CMD ["prosody"]